ComponentsFoundations

Button

Triggers an action. Eight variants, a loading state, and the option to render as another element (asChild).

Radix Slot components/button.tsxtheme · material · accent · density · font

Installation

$ pnpm add @vamos-cms/ui

The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-cms/ui/styles.css";

Usage

import { Button } from "@vamos-cms/ui";

<Button variant="primary">Publish</Button>

Examples

Variants

Use one primary per screen; keep the rest secondary or ghost.

Sizes

The md height comes from the --control-h token, so it follows the density axis.

With icon

Put the icon before the label; it is sized from the button size.

Icon Button

For icon-only buttons. The label prop is required.

Loading

loading locks the button and adds a spinner and aria-busy.

Pill

Fully rounded — for website CTAs.

API

Button

PropTypeDefault
variant
Visual weight.
"primary" | "secondary" | "solid" | "soft" | "ghost" | "danger" | "danger-ghost" | "link""secondary"
size
Height and padding.
"xs" | "sm" | "md" | "lg" | "icon-xs" | "icon-sm" | "icon""md"
loading
Spinner + click lock + aria-busy.
booleanfalse
asChild
Pass the styles to the single child element (e.g. Next Link).
booleanfalse
block
Full width.
booleanfalse
pill
Fully rounded corners.
booleanfalse

IconButton

PropTypeDefault
label
Required. Used as aria-label and title.
string—
size
Square size.
"xs" | "sm" | "md""md"
variant
Same variants as Button.
Button variant"ghost"