Skip to content
SevenUI
Sign inGet Pro
On this page

Button

Displays a button built on the Base UI Button primitive, with default, secondary, outline, ghost, destructive, and link variants.

Displays a button built on the UI SDK Button component, with default, secondary, outline, ghost, destructive, and link variants.

Installation

Usage

Examples

Variants

Sizes

Text sizes pair with icon-* counterparts for icon-only buttons — give those an aria-label.

Disabled

Loading

Pair disabled with the Spinner component while an action is in flight.

API reference

The UI SDK flavour is built on UI SDK Button. Its API is the SevenUI wrapper's, the same in both flavours: export names, props, data-slot values and the render prop, so code that uses only the SevenUI exports compiles against either flavour. Nothing a reader would notice behaves differently. Switch to Base UI to read the prop tables, which describe that shared API in Base UI's terms.

Button

Extends the Base UI Button primitive — all its props (including render and disabled) apply.

PropTypeDefault
variant"default" | "outline" | "secondary" | "ghost" | "destructive" | "link""default"
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"

buttonVariants is also exported for styling custom elements.

Was this page helpful?