Skip to main content

Button

A clickable button with multiple variants, sizes, shapes, and loading state.

Variants

Sizes

Shapes

Loading

Full Width

Elevation

primary and danger variants ship with a gradient surface + inset highlight + micro-lift hover by default (elevation="raised"). Use elevation="flat" for dense surfaces where the lift would feel noisy (toolbars, inline action rows). outline / ghost / secondary are always flat regardless.

Mobile considerations

  • All hover effects (lift + brightness) are guarded by @media (hover: hover) so they don't get "stuck" after a tap on touch devices.
  • Active press uses --tui-duration-instant (80ms) for immediate feedback.
  • Buttons meet the 44×44px tap-target minimum at size="md" and lg. For size="sm", ensure the surrounding row gives at least 8px vertical padding.

Props

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'danger''primary'Visual style variant
size'sm' | 'md' | 'lg''md'Size of the button
shape'square' | 'rounded' | 'pill''square'Shape of the button
elevation'flat' | 'raised''raised' (primary/danger), 'flat' (others)Visual elevation. Raised adds gradient + inset + hover lift.
loadingbooleanfalseShows a spinner and disables the button
startIconReactNode-Icon placed before the children
endIconReactNode-Icon placed after the children
fullWidthbooleanfalseStretches the button to fill its container
disabledbooleanfalseDisables the button

Also accepts all standard <button> HTML attributes.