layout.command
A shell command to copy and run: the main call to action wherever it appears. Its copy button covers the whole box, so a click anywhere copies
Layout intents
Example
<Layout intent="layout.command">
…
</Layout>Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
If it is
Use
A shell command to copy and run: the main call to action wherever it appears. Its copy button covers the whole box, so a click anywhere copies
layout.commandthis pageA code sample of several lines
text.codeA row of controls for the content below
layout.toolbar
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.
What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.
How layout.command resolves, and its definition
Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.
arrange.rowChildren in a wrapping row
flex flex-row flex-wrap items-center
layout.commandA shell command to copy and run: the main call to action wherever it appears. Its copy button covers the whole box, so a click anywhere copies
relative w-fit cursor-pointer flex-nowrap items-center gap-4 rounded-lg bg-secondary py-1.5 pr-1.5 pl-4 font-mono text-sm text-foreground transition-colors hover:bg-secondary/80 [&>button]:static [&>button]:size-auto [&>button]:rounded-full [&>button]:bg-primary [&>button]:px-3 [&>button]:py-1.5 [&>button]:text-primary-foreground [&>button]:after:absolute [&>button]:after:inset-0 [&>button]:after:rounded-lg [&>button]:after:content-[''] hover:[&>button]:bg-primary/90 [&>button:hover]:text-primary-foreground hover:[&>button]:text-primary-foreground
flex flex-row relative w-fit cursor-pointer flex-nowrap items-center gap-4 rounded-lg bg-secondary py-1.5 pr-1.5 pl-4 font-mono text-sm text-foreground transition-colors hover:bg-secondary/80 [&>button]:static [&>button]:size-auto [&>button]:rounded-full [&>button]:bg-primary [&>button]:px-3 [&>button]:py-1.5 [&>button]:text-primary-foreground [&>button]:after:absolute [&>button]:after:inset-0 [&>button]:after:rounded-lg [&>button]:after:content-[''] hover:[&>button]:bg-primary/90 [&>button:hover]:text-primary-foreground hover:[&>button]:text-primary-foreground
'layout.command': {
kind: 'semantic',
description: 'A shell command to copy and run: the main call to action wherever it appears. Its copy button covers the whole box, so a click anywhere copies',
refs: ['arrange.row'],
binding: {
classes: 'relative w-fit cursor-pointer flex-nowrap items-center gap-4 rounded-lg bg-secondary py-1.5 pr-1.5 pl-4 font-mono text-sm text-foreground transition-colors hover:bg-secondary/80 [&>button]:static [&>button]:size-auto [&>button]:rounded-full [&>button]:bg-primary [&>button]:px-3 [&>button]:py-1.5 [&>button]:text-primary-foreground [&>button]:after:absolute [&>button]:after:inset-0 [&>button]:after:rounded-lg [&>button]:after:content-[\'\'] hover:[&>button]:bg-primary/90 [&>button:hover]:text-primary-foreground hover:[&>button]:text-primary-foreground',
},
notFor: [
{ context: 'a code sample of several lines', instead: 'text.code' },
{
context: 'a row of controls for the content below',
instead: 'layout.toolbar',
},
],
},