UI Library

Button

Prop Type Default Value Notes
accent'cyan' | 'emerald' | 'amber' | 'violet' | 'rose''cyan'
Tint for primary and outline.
ariaControlsstring?—
Id of the element the button controls (a popup trigger’s panel).
ariaExpandedboolean—
Disclosure state for popover triggers.
ariaHaspopup'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | boolean—
Kind of popup the button opens; true/false set the boolean form.
ariaLabelstring?—
Accessible name for icon-only buttons.
ariaPressedboolean—
Toggle state for pressable buttons.
childrenSnippet—
Button label/content; committing applies it.
classNamestring?''
Extra classes appended to the button.
disabledbooleanfalse
Native disabled + reduced opacity.
focusRingbooleantrue
Keyboard focus ring; disable only when focus stays visible another way.
formstring?—
Id of the form the button submits, for a button rendered outside it.
iconSnippet—
Leading icon; icon-only when no children. Button sizes it from its own size, so the glyph stays bare.
pendingbooleanfalse
Disabled state with a spinner slot.
preventFocusStealbooleanfalse
Keeps focus on the current element when clicked.
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | number'md'
Control scale; numbers are icon-scale pixels interpolated between the steps.
tooltipstring?—
Wraps the button with the positioned Tooltip.
tooltipAlign'center' | 'left' | 'right''center'
Tooltip alignment.
type'button' | 'submit' | 'reset''button'
Native button type.
variant'primary' | 'secondary' | 'danger' | 'outline' | 'ghost''secondary'
Visual treatment.
buttonElHTMLButtonElement | nullnull—Bindable native button element.
onClick(event: MouseEvent) => void——Click handler.
onKeyDown(event: KeyboardEvent) => void——Keydown handler.