← All buttons

Core / Buttons

Button

Triggers an immediate user action.

Preview

import { Button } from "@/components/ui/design-system/core/buttons/Button"

<Button variant="primary" size="md">Continue</Button>

Installation

Full library

pnpm install:project /absolute/path/to/your-project

Manual install

The guided installer is the next library milestone. This component will be selectable as Core → Buttons → Button.

Usage

<Button variant="primary" size="md">Continue</Button>

Adopt to your project

Use variant and size for semantics. Use className for local spacing, width, color, and composition. The rendered element exposes data-slot, data-variant, and data-size selectors.

<Button variant="primary" size="md" className="rounded-full px-6 shadow-sm">Continue</Button>

Accessibility

Use clear visible text. Keep type=button unless the action submits or resets a form. Loading buttons expose aria-busy and are disabled.

API reference

AttributeTypeDefaultRequiredPurpose
childrenReactNodeYesVisible button content.
variant"primary" | "secondary" | "outline" | "ghost" | "destructive""primary"NoSemantic action treatment.
size"sm" | "md" | "lg""md"NoControl height and horizontal padding.
radius"sm" | "md" | "lg" | "xl" | "full"component defaultNoCorner treatment.
loadingbooleanfalseNoShows loading content and prevents interaction.
disabledbooleanfalseNoPrevents interaction.
type"button" | "submit" | "reset""button"NoNative button behavior.
classNamestringNoLocal project styling.
unstyledbooleanfalseNoRemoves the component’s default classes.