Button
Primary action control for SterlingCraft interfaces. Rust-filled by default; secondary is a bark outline, ghost is quiet.
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
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "primary" | "secondary" | "ghost" | "primary" | Visual style. |
size | "sm" | "md" | "lg" | "md" | Size. |
iconLeft | ReactNode | — | Icon node placed before the label. |
iconRight | ReactNode | — | Icon node placed after the label. |
fullWidth | boolean | false | Stretch to fill the container width. |
disabled | boolean | false | Disable interaction. |
href | string | — | Render as an anchor with this href instead of a button. |