Elements

Reference

Split Button

A primary action with its alternatives one seam away: the main button fires `click`, the fitted arrow opens a paper vessel of the same register whose entries emit `select` with their value. The arrow is the menu machine's trigger grafting our button via `asChild` — the machine keeps the element (positioning, focus, `data-state`), the button recipe dresses it. The popup keeps the menu parts untouched.

Item · Root · Trigger

#SplitButton

A primary action with its alternatives one seam away: the main button fires click, the fitted arrow opens a paper vessel of the same register whose entries emit select with their value. The arrow is the menu machine's trigger grafting our button via asChild — the machine keeps the element (positioning, focus, data-state), the button recipe dresses it. The popup keeps the menu parts untouched.

PropTypeDefaultDescription
labelStringThe main action's label.
itemsArray as PropType<SplitButtonEntry[]>() => []The dropdown's entries.
variantString"solid"How both halves rest; the arrow always reads as one control with the main button.
toneString"ink"The pigment the halves are inked with; ink is the solemn default, and the fixed pigments speak for their meaning.
sizeString"md"One rung of the control-height ladder for both halves.
disabledBooleanfalse—
EventPayload
click() => true
select(value: string) => typeof value === "string"