Link
Text that navigates to another page or place: inline inside a sentence, standalone on its own line, or an announcement chip, with an external variant that opens a new tab.
Clickable action control with appearance × mode (plus an optional flat set) and a fixed set of sizes.
Appearance × mode: solid, outline, soft, ghost across primary, neutral, and danger. Optional flat set drops elevation. One solid-primary CTA per view. Lucide icon slots via iconStart and iconEnd. Heights are 32, 36 and 40, the same as Input, Select and FilterButton. Icon-only is a square of that height and needs aria-label; IconButton is the typed export for it.
A solid primary Button at md. Variants shows every appearance, mode, flat, icon and state.
One appearance="solid" mode="primary" Button per view. Neutral outline for cancel and alternate paths, ghost for toolbars, danger only for irreversible work. Flat drops the resting shadow so a white control still reads on a white card. Pass Lucide export names on iconStart and iconEnd. Icon-only omits children and must set ariaLabel. Set loading while the action runs: the label stays, a spinner takes the leading icon slot, the width holds, and clicks are ignored.
import { Button } from "agentic-ds-kit";From contracts/button.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| draggable | boolean | No | — | Native drag source. Use with onDragStart/onDragEnd, e.g. a chip that drags into a list. |
| onDragStart | function | No | — | (event: DragEvent<HTMLButtonElement>) => void. Set dataTransfer here. |
| onDragEnd | function | No | — | (event: DragEvent<HTMLButtonElement>) => void. |
| size | lg | md | sm | No | md | Heights from control-height: sm 32, md 36, lg 40, the same as Input, Select and FilterButton. Icon-only is a square of that height. |
| appearance | solid | outline | soft | ghost | No | solid | — |
| mode | primary | neutral | danger | No | primary | — |
| flat | boolean | No | false | Flat set: no elevation. Combine with solid, outline, or soft (ghost is coerced to soft). |
| disabled | boolean | No | false | Uses text-fg-disabled, border-disabled and surface-muted. Ghost keeps no fill. |
| loading | boolean | No | false | The action is running. Sets aria-busy, shows a spinner in the leading icon slot, keeps the label and ignores clicks. The button stays focusable. disabled wins when both are set. |
| children | string | No | — | required unless icon-only |
| iconStart | KitIcon | No | — | A curated Lucide name (PascalCase or kebab-case) renders instantly; any other Lucide name needs import "agentic-ds-kit/icons-on-demand" once (otherwise it is skipped with a dev warning). Or pass the Lucide component (Plus) or an element. Left empty on a labelled solid, outline or soft danger Button, it defaults to TriangleAlert so danger is not colour alone; pass Trash2 for a delete. |
| iconEnd | KitIcon | No | — | A curated Lucide name (PascalCase or kebab-case) renders instantly; any other Lucide name needs import "agentic-ds-kit/icons-on-demand" once (otherwise it is skipped with a dev warning). Or pass the Lucide component (Plus) or an element. |
| shortcut | string | No | — | Visual key hint after the label, e.g. "⏎", "Esc", "⌘⏎". aria-hidden: wire the key yourself and set aria-keyshortcuts. Hidden on touch screens and below --grid-breakpoint-sm. Ignored when icon-only. |
| ariaLabel | string | No | — | required when children is omitted (icon-only) |
| onClick | function | No | — | — |
| type | button | submit | reset | No | button | — |
| shape | default | pill | No | default | pill uses radius-pill. Drawer footers use pill. |
| block | boolean | No | false | Full width of the parent. |