Button

A clickable action control backed by semantic variants and tone utilities.

Preview#

Controls
import { Button } from "raft-ui";

<Button />

Variants#

States#

Sizes#

Icons#

Place data-icon="inline-start" or data-icon="inline-end" on an icon beside text so its side padding tightens automatically. It is a child-icon attribute, not a Button prop.

Loading#

Disabled#

API#WIP

PropTypeDefaultDescription
variant"default" | "primary" | "outline" | "information" | "muted" | "accent" | "warning" | "danger" | "danger-secondary" | "danger-outline" | "ghost" | "link""default"Action semantics. Variants consume semantic layer and tone utilities.
size"xs" | "sm" | "md" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg""md"Text sizes scale height and padding; icon-* sizes render a square icon-only button.
loadingbooleanfalseShows an inline Spinner, preserves button width, and disables interaction.
loadingLabelstring"Loading"Accessible label for the loading indicator.
renderReactElement | (props, state) => ReactElementReplace the rendered element or compose with another component (Base UI).
...propsBase UI Button.PropsAll native button attributes (onClick, disabled, type, etc.) plus Base UI props.