theme
components / 09
marked select
open the list and the entire decision redraws itself, from border to chosen item.
shadcn
npx shadcn@latest add berkantay/cheez/marked-selectlive
violetplayground
color system
used for every new marksize
character
open frame
selected mark
open ink
selected ink
state
<MarkedSelect
label="color system"
items={themes}
value={"violet"}
openMark="rounded-box"
selectedMark="asterisk"
character="rushed"
onValueChange={setValue}
>
<MarkedSelectTrigger placeholder="choose a color" />
<MarkedSelectContent>
{themes.map((theme) => (
<MarkedSelectItem value={theme.value}>
{theme.label}
</MarkedSelectItem>
))}
</MarkedSelectContent>
</MarkedSelect>behavior
each field remains fully operablestates
theme
theme*
theme
select onetheme
theme
composition
labels, separators, disabled itemsgrouped tools
default tool
typeahead finds an item by namegroups carry meaning without becoming louder than the options. keyboard typeahead and native form submission remain handled by Base UI.
reference
compound parts, one visual contextapi
| part | prop | type | default | purpose |
|---|---|---|---|---|
| Select | value | string | null | — | controlled value |
| Select | defaultValue | string | null | null | uncontrolled initial value |
| Select | onValueChange | function | — | selection callback |
| Select | items | Item[] | Record | — | value label lookup |
| Select | label | ReactNode | — | accessible visible label |
| Select | description | ReactNode | — | helper text |
| Select | error | ReactNode | — | invalid state and message |
| Select | openMark | CheezType | "rounded-box" | open trigger frame |
| Select | selectedMark | CheezType | "asterisk" | selected item symbol |
| Select | character | "calm" | "rushed" | "chaotic" | "rushed" | drawing personality |
| Select | size | "small" | "medium" | "large" | "medium" | trigger scale |
| Select | name | string | — | native form field name |
| Select | required | boolean | false | required form state |
| Select | readOnly | boolean | false | read-only state |
| Select | disabled | boolean | false | disabled state |
| Trigger | placeholder | ReactNode | "select" | empty value copy |
| Content | alignItemWithTrigger | boolean | false | popup positioning mode |
| Content | sideOffset | number | 6 | trigger gap |
| Item | value | string | — | unique option value |
| Item | disabled | boolean | false | disabled option |
behavior notes
- Enter, Space, Arrow Up, and Arrow Down open the popup
- typing performs keyboard typeahead
- Escape closes and restores trigger focus
- the selected value joins native form submission
- the popup never depends on Framer Motion
- reduced-motion users skip caret and popup transitions