← All components

Component

Button

Primary action control for SterlingCraft interfaces. Rust-filled by default; secondary is a bark outline, ghost is quiet.

Button.jsx Button.d.ts Button.prompt.md Open raw preview HTML

Live demo

Rendered with the actual component source, not a re-implementation.

Usage

import { Button } from "./Button.jsx";

<Button variant="primary" size="md" onClick={save}>Place order</Button>
<Button variant="secondary">View catalogue</Button>
<Button variant="ghost" iconRight={<ChevronRight />}>Learn more</Button>

Props

Button props — see the source .d.ts for the complete type.
PropTypeDefaultDescription
variant"primary" | "secondary" | "ghost""primary"Visual style.
size"sm" | "md" | "lg""md"Size.
iconLeftReactNodeIcon node placed before the label.
iconRightReactNodeIcon node placed after the label.
fullWidthbooleanfalseStretch to fill the container width.
disabledbooleanfalseDisable interaction.
hrefstringRender as an anchor with this href instead of a button.