Button
Primary and secondary actions; renders as any element via the as prop.
import { Button } from "@ps1ui/core";Variants
<Button variant="primary">Deploy</Button>
<Button variant="secondary">Cancel</Button>Disabled
<Button disabled>Deploy</Button>
<Button variant="secondary" disabled>Cancel</Button>As a link
<Button as="a" href="https://github.com/koki-develop/ps1ui">
View on GitHub
</Button>On the native button element, type defaults to "button" — a Button inside a form never submits implicitly. Pass type="submit" explicitly when the button should submit.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
as | ElementType | "button" | Element or component to render instead of the native <button> — e.g. "a" or a router Link. |
variant | "primary" | "secondary" | "primary" | Visual style: "primary" for the main action, "secondary" for supporting actions. |
Also accepts the attributes of the element rendered via as (default: <button>); ref is not supported.