components / 29
marked command
search should feel immediate, not invisible. every focused command carries a bright hand-drawn trace and every shortcut stays readable.
shadcn
npx shadcn@latest add berkantay/cheez/marked-commandlive
type or use arrow keysfind the next action
⌘ k search without leaving
ink
character
value
<MarkedCommand
items={actions}
value={selected}
onValueChange={setSelected}
itemToStringLabel={(action) => action.label}
tone="purple"
character="rushed"
>
<MarkedCommandInput />
<MarkedCommandContent>
<MarkedCommandEmpty>no command found.</MarkedCommandEmpty>
<MarkedCommandList>
{(action) => <MarkedCommandItem value={action}>{action.label}</MarkedCommandItem>}
</MarkedCommandList>
</MarkedCommandContent>
</MarkedCommand>palette
focus returns to the trigger on closeopen above the work
the command menu can stay inline or arrive as a focused palette.
the dialog owns focus and escape behavior. the command still owns search, highlighting, and selection.
structure
visible labels, searchable childrengroups keep the scan quick
01create2 actions
02navigate2 actions
03appearance2 actions
states
empty, loading, disabledsilence is still a state
reference
Base UI mechanics, Cheez feedbackapi
| part | prop | type | default | purpose |
|---|---|---|---|---|
| Root | items | Action[] | Group[] | — | filterable command collection |
| Root | value | Action | null | — | controlled chosen command |
| Root | onValueChange | function | — | run or store a command |
| Root | label | ReactNode | "command menu" | accessible search label |
| Root | tone | MarkedCommandTone | "purple" | field and result ink |
| Root | character | CheezCharacter | "rushed" | drawing pressure |
| Input | placeholder | string | "type a command…" | search prompt |
| Input | clearLabel | string | "clear command search" | clear-button name |
| Content | loading | boolean | false | announced search state |
| Item | description | ReactNode | — | secondary result copy |
| Item | icon | ReactNode | — | decorative leading symbol |
| Item | shortcut | ReactNode | — | visible keyboard hint |
| Separator | color | string | "#ff4f2e" | hand-cut group divider |
behavior notes
- the search field keeps a real combobox role and accessible label
- Arrow Down and Arrow Up move focus, Enter chooses, and Escape closes
- the selected result is surfaced through onValueChange, never hidden in context
- groups and empty states stay part of the Base UI collection model
- dialog focus trapping and restoration come from Base UI
- the shortcut is a visual hint; application-level keyboard bindings remain yours
- no Framer Motion is shipped