Actions
Button
The action of a page or a form: one default button per view, others outlined or quiet.
Installation
pnpm add @elsikora/keystone-ui-kitUsage
import { Button } from "@elsikora/keystone-ui-kit";import { Button } from "@elsikora/keystone-ui-kit";
export default function ButtonDefaultExample() { return <Button>Upload a release</Button>;}Examples
Default
Variants
Destructive is drawn in ink, outlined, and only ever opens a confirmation dialog.
Sizes
Small is small on a large screen only; a phone keeps the 44 px touch target.
Busy
Announced as busy and unavailable; presses are ignored and the button keeps its place.
As a link
API reference
Button
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "ghost" | "link" | "destructive" | "default" | The look. |
size | "default" | "sm" | "lg" | "icon" | "default" | The size; an icon button needs an aria-label. |
busy | boolean | false | The action runs: aria-busy, aria-disabled, presses ignored. |
busyLabel | string | "working" | Read after the label while busy. |
asChild | boolean | false | Draws its one child (a router's link) in its place. |
disabled | boolean | false | Unavailable. |
Notes
- Use one default button per view.
- A link drawn as a button takes
buttonVariants()orasChild.