Button

Button is used to start an instant operation and is used when it triggers an action or event.

Variant

Four appearances are available: default, solid, twoTone and plain.

Size

Buttons come in four sizes — xs, sm, md and lg. The default is md.

Color

Semantic colors map to the design tokens, so they follow the theme automatically.

Disabled

The disabled attribute dims the button and removes pointer events.

Shape

Swap the radius utility to change the shape — rounded, circle or square.

Icon

A fixed square size with no padding gives an icon-only button. Always provide an aria-label.

Button With Icon

Icons can lead or trail the label; the flex gap handles the spacing.

Loading

A spinning ring plus the disabled attribute communicates work in progress.

Block

Add w-full to stretch a button to its container.