0
Components
API reference

Button

A versatile button component with multiple variants, sizes, shapes, morphing press feedback, loading state, and ripple.

Installation

Usage

Examples

Secondary

Elevated

Outline

Ghost

Destructive

With Icon

Icon Only

Loading

Morph & Selected

API Reference

Button

Renders an interactive button element with ripple feedback, optional shape morphing, and polymorphic rendering via Base UI useRender.

PropTypeDefaultDescription
variant"default" | "filled" | "secondary" | "tonal" | "elevated" | "outline" | "ghost" | "text" | "link" | "destructive" | "destructive-outline""default"Visual style variant
size"xs" | "sm" | "default" | "md" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon" | "icon-md" | "icon-lg" | "icon-xl""default"Size of the button, controlling height, padding, and icon sizing
width"narrow" | "wide"-Adjusts the width of icon-only buttons
shape"round" | "square""round"Base corner radius shape
morphbooleanfalseEnables spring corner morphing on press and when selected
selectedboolean-Sets aria-pressed and data-selected for toggleable buttons
loadingbooleanfalseShows a centered Spinner and disables interaction while true
disabledbooleanfalseDisables the button natively and sets aria-disabled
renderReact.ReactElement | ((props, state) => React.ReactElement)-Custom element to render (e.g. <Link /> or <a />)
classNamestring-Additional CSS classes
...propsReact.ComponentProps<"button">-All standard button attributes are supported

buttonVariants

A cva helper exported for composing button variant styles on custom elements (pair with tautSize for sizing).

© taut ui — built with Base UI and Tailwind CSS v4.