UI Siêu Ngon

Button

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

Playground
Label
variant
size
loading
disabled
rounded
<Button>
  Click me
</Button>

Variants

Six visual styles to match different UI contexts.

Sizes

Three sizes to fit different layout densities.

With Icons

Use leftIcon and rightIcon to add icons alongside the label.

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. Use iconOnly to hide the text.

Outline Variants

Outline buttons with color overrides.

API

PropertyTypeDefaultDescription
variant"primary" | "secondary" | "danger" | "warning" | "outline" | "ghost""primary"Visual style variant of the button
size"sm" | "md" | "lg""md"Size preset
loadingbooleanfalseShow loading spinner and disable interaction
disabledbooleanfalseDisable the button
iconOnlybooleanfalseSquare button for icon only — hides children text
leftIconReactNodeIcon rendered before the label
rightIconReactNodeIcon rendered after the label
color"danger" | "warning" | "secondary"Color override for the outline variant
onClick(e: MouseEvent) => voidClick handler