Button

A button, or a component that looks like one.

Installation

  1. Add the registryOnce per project
  2. Add button

Usage

To render a link that looks like a button, pass buttonVariants to its class name rather than nesting an anchor in a button.

Examples

Sizes

size sets the height and padding.

With icons

Icon only

The icon sizes make a square button. Give it an aria-label.

Disabled

Invalid

Set aria-invalid to mark the button as invalid.

Props

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

Button