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
@marktiderman/genesis-uiimport { Button } from "@marktiderman/genesis-ui";@marktiderman/genesis-ui.- Button
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.
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild* | true | — | |
| disabled | boolean | — | 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`. |
| endIcon | ReactNode | — | Optional trailing icon slot. Ignored when `asChild`. |
| loading | boolean | — | 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. |
| ref | Ref<HTMLElement> | — | |
| size | "default" | "sm" | "lg" | "icon" | null | — | |
| startIcon | ReactNode | — | Optional leading icon slot (replaced by the spinner while loading). Ignored when `asChild`. |
| testID | string | — | Stable test/automation selector (emitted as `data-testid`). |
| variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "gradient" | null | — |