UI Library

Button

Default


Props

PropTypeDefaultNotes
variant'primary' | 'secondary' | 'danger' | 'outline' | 'ghost''secondary'Visual treatment.
accent'cyan' | 'emerald' | 'amber' | 'violet' | 'rose''cyan'Tint for primary, outline, and badge.
size'xs' | 'sm' | 'md' | 'lg''md'Control size.
disabledbooleanfalseNative disabled + reduced opacity.
pendingbooleanfalseDisabled state with a spinner slot.
type'button' | 'submit' | 'reset''button'Native button type.
classNamestring''Extra classes appended to the button.
ariaPressedbooleanToggle state for pressable buttons.
ariaExpandedbooleanDisclosure state for popover triggers.
ariaLabelstringAccessible name for icon-only buttons.
onClick(event: MouseEvent) => voidClick handler.
onKeyDown(event: KeyboardEvent) => voidKeydown handler.
preventFocusStealbooleanfalseKeeps focus on the current element when clicked.
dataTipstringdata-tip attribute for the host tooltip engine.
tooltipstringWraps the button with the positioned Tooltip.
tooltipAlign'center' | 'left' | 'right''center'Tooltip alignment.
badgestring | numberCount pill overhanging the top-right corner.
iconSnippetLeading icon; icon-only when no children.
childrenSnippetButton label/content.
buttonElHTMLButtonElement | nullnullBindable native button element.