Button

A clickable control used to trigger an action or event.

$bunx shadcn@latest add @nx-ui/button
Registry item

Variants

The six button styles.

Sizes

From xs to lg, plus icon-only sizes.

With icons

Icons sit inline-start or inline-end of the label.

Disabled & loading

Disabled controls dim and stop responding; use a spinner for pending actions.

API reference

Exported parts and their props, extracted from the component source.

PropTypeDefaultDescription
variant"default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | …"default"
size"default" | "xs" | "sm" | "lg" | "xl" | "icon" | …"default"

…extends ButtonPrimitive.Props