components / 09

marked select

open the list and the entire decision redraws itself, from border to chosen item.

shadcnnpx shadcn@latest add berkantay/cheez/marked-select
live

playground

violet
color system
used for every new mark
size
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

states

each field remains fully operable
placeholder
theme
filled
theme
required
theme
invalid
theme
select one
read only
theme
disabled
theme
composition

grouped tools

labels, separators, disabled items
default tool
typeahead finds an item by name

groups carry meaning without becoming louder than the options. keyboard typeahead and native form submission remain handled by Base UI.

reference

api

compound parts, one visual context
partproptypedefaultpurpose
Selectvaluestring | nullcontrolled value
SelectdefaultValuestring | nullnulluncontrolled initial value
SelectonValueChangefunctionselection callback
SelectitemsItem[] | Recordvalue label lookup
SelectlabelReactNodeaccessible visible label
SelectdescriptionReactNodehelper text
SelecterrorReactNodeinvalid state and message
SelectopenMarkCheezType"rounded-box"open trigger frame
SelectselectedMarkCheezType"asterisk"selected item symbol
Selectcharacter"calm" | "rushed" | "chaotic""rushed"drawing personality
Selectsize"small" | "medium" | "large""medium"trigger scale
Selectnamestringnative form field name
Selectrequiredbooleanfalserequired form state
SelectreadOnlybooleanfalseread-only state
Selectdisabledbooleanfalsedisabled state
TriggerplaceholderReactNode"select"empty value copy
ContentalignItemWithTriggerbooleanfalsepopup positioning mode
ContentsideOffsetnumber6trigger gap
Itemvaluestringunique option value
Itemdisabledbooleanfalsedisabled 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