Button

Trigger actions, submit forms, and navigate. Supports multiple variants, sizes, loading states, and icon slots.

Playground
Label
variant
size
leftIcon
rightIcon
outline
iconOnly
loading
disabled
rounded
<Button>
  Click me
</Button>

Variants

Five visual styles, plus outline mode for any variant.

Sizes

Three sizes to fit different layout densities.

String Icons

Pass a string name directly to leftIcon or rightIcon. No import needed.

All Icons

Every available icon name for the iconOnly shorthand.

With Icons (ReactNode)

You can still pass any ReactNode to leftIcon and rightIcon.

Loading

Set loading to show a spinner and disable the button automatically.

Disabled

Visually muted and non-interactive.

Icon Only

Square button for icon-only actions. Pass the icon via leftIcon, not children.

Outline with Colors

Combine outline with the color prop to change border and text color.

API

PropertyTypeDefaultDescription
variant"primary" | "secondary" | "danger" | "warning" | "ghost""primary"Visual style variant of the button
outlinebooleanfalseOutline style with transparent background and colored border
size"sm" | "md" | "lg""md"Size preset
loadingbooleanfalseShow loading spinner and disable interaction
disabledbooleanfalseDisable the button
iconOnlybooleanfalseSquare button for icon-only use, hides children text
leftIconButtonIconName | ReactNodeIcon before the label. Pass a ReactNode or a string name: "plus" | "download" | "upload" | "import" | "export" | "close" | "save" | "delete" | "arrow-right" | "arrow-left" | "arrow-top" | "arrow-down"
rightIconButtonIconName | ReactNodeIcon after the label, same string names as leftIcon
color"danger" | "warning" | "secondary"Color override for outline buttons
onClick(e: MouseEvent) => voidClick handler