Button
Triggers an action. Renders a <button> by default, or an <a> when you pass href.
Variants
<Button>Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="danger">Danger</Button>
<Button variant="soft">Soft</Button>
<Button variant="outline">Outline</Button>Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>As a link
<Button href="/">Home</Button>
<Button href="/" variant="secondary" disabled>Disabled link</Button>Disabled
<Button disabled>Disabled</Button>Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | primary | secondary | ghost | danger | soft | outline | primary | Visual style. |
size | sm | md | lg | md | Padding and font size. |
href | string | - | Renders an anchor with button styling. |
type | button | submit | reset | button | Native type, button element only. |
disabled | boolean | false | Blocks interaction. |
Theming
:root {
--ink-button-radius: 999px; /* pill buttons */
--ink-button-pad-x: 1.25rem; /* wider buttons */
--ink-button-primary-hover: #9a3412;
--ink-button-ghost-text: #7c2d12; /* ghost/soft/outline text, AA on surface */
}Accessibility
- Renders a native
<button>or<a>, so keyboard activation works without script. - Disabled anchors get
aria-disabled="true"pluspointer-events: none. - Pass
aria-labelwhen the label is only an icon. - Focus ring comes from
--ink-focus-color, visible in both themes.