Skip to content

Actions

Button

The action of a page or a form: one default button per view, others outlined or quiet.

Installation

Terminal
pnpm add @elsikora/keystone-ui-kit

Usage

Import
import { Button } from "@elsikora/keystone-ui-kit";
docs/button/default.example.tsx
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.

API reference

Button

PropTypeDefaultDescription
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.
busybooleanfalseThe action runs: aria-busy, aria-disabled, presses ignored.
busyLabelstring"working"Read after the label while busy.
asChildbooleanfalseDraws its one child (a router's link) in its place.
disabledbooleanfalseUnavailable.

Notes

  • Use one default button per view.
  • A link drawn as a button takes buttonVariants() or asChild.