Genesis
@stable

Button

Default action surface — 6 variants × 4 sizes.

Button — primary interactive control. Variants: default, secondary, outline, ghost, destructive, link, gradient (the brand's `gradients.primary`, else the primary). Overloaded on `asChild`: see {@link ButtonProps} for the default `<button>` mode and {@link ButtonAsChildProps} for Slot composition. The `ButtonProps` signature is declared LAST on purpose — `React.ComponentProps<typeof Button>` infers from the final call signature, so reordering these two silently changes what that resolves to for every consumer.

packages/ui/src/components/ui/button.tsx

Import
Subpath export: @marktiderman/genesis-ui
import { Button } from "@marktiderman/genesis-ui";
Exports
Re-exported from @marktiderman/genesis-ui.
  • Button
Components
Auto-generated from TypeScript source via react-docgen-typescript.

Button

Button — primary interactive control. Variants: default, secondary, outline, ghost, destructive, link, gradient (the brand's `gradients.primary`, else the primary). Overloaded on `asChild`: see {@link ButtonProps} for the default `<button>` mode and {@link ButtonAsChildProps} for Slot composition. The `ButtonProps` signature is declared LAST on purpose — `React.ComponentProps<typeof Button>` infers from the final call signature, so reordering these two silently changes what that resolves to for every consumer.

PropTypeDefaultDescription
asChild*true—
disabledboolean—Makes the control inert. On a real `<button>` this is the native `disabled` attribute; in `asChild` mode it becomes `aria-disabled` plus activation blocking, because `disabled` is a button-only attribute that anchors and router links ignore entirely. See `asChild`.
endIconReactNode—Optional trailing icon slot. Ignored when `asChild`.
loadingboolean—Marks the control busy: renders a spinner in the leading slot and makes the control inert (see `disabled`). In `asChild` mode the spinner is not injected — there is no button chrome to put it in — but the control is still made inert, so a "loading" link can't be activated mid-flight.
refRef<HTMLElement>—
size"default" | "sm" | "lg" | "icon" | null—
startIconReactNode—Optional leading icon slot (replaced by the spinner while loading). Ignored when `asChild`.
testIDstring—Stable test/automation selector (emitted as `data-testid`).
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "gradient" | null—
Storybook
Storybook hosts the canonical visual reference with controls for every variant.