Button
A clickable control that triggers an action.
Variants
Five styles. There is only one ghost; an action that reads as a text link is a Link.
Sizes
Available in small, default, large, extra-large and icon sizes; the corner radius and the icon grow with the size: with a label the icon is 16 (SM), 20 (MD, LG) or 24 (XL); an icon-only button is a step larger — 20, 20, 24, 24.
Active
A button whose menu is open looks pressed while the menu is shown. The dropdown sets aria-expanded to true on its trigger and that is enough; vt-active gives the same look by class (a button picked in a toolbar). In Figma it is State=Pressed: an open menu and a press look the same.
With Icon
An icon before or after the label. In Figma they are Show Left Icon and Show Right Icon — on in the main component, switched off on an instance that needs no icon — with Left Icon and Right Icon to swap the glyph — a button has no slot. The icon keeps its own size: set it on the instance, or bind it to a variable.
States
Full Width
Button that stretches to fill its container.
Icon Only
Buttons that contain only an icon, used for compact actions and toolbars.
Icon Sizes
Icon buttons in small, default, and large sizes — the corner follows the size, like the text buttons.
Guidelines
Read our documentation to get started.
Read our to get started.
API Reference
| Class | Type | Description |
|---|---|---|
vt-btn |
Base | Base button styles — flex, rounded, font, transition |
vt-btn-primary |
Variant | Brand fill, on-brand text — primary actions |
vt-btn-secondary |
Variant | Muted fill — secondary actions |
vt-btn-bordered |
Variant | Outline only, no fill |
vt-btn-danger |
Variant | Red fill — destructive actions |
vt-btn-ghost |
Variant | Transparent, secondary text, subtle hover background — the one quiet button, for any low-emphasis action |
vt-btn-sm |
Size | Small button (32px height, text-xs, radius-sm) |
vt-btn-lg |
Size | Large button (48px height, radius-lg) |
vt-btn-xl |
Size | Extra-large button (56px height, text-base, radius-xl) |
vt-active |
State | A button whose menu or panel is open, or the one picked in a toolbar: it looks pressed, with the pressed fill of its variant (State=Pressed in Figma — there is no separate Active). An open menu trigger gets the same look from aria-expanded="true", which the dropdown sets |
vt-btn-icon |
Modifier | Square aspect ratio for icon-only buttons |
disabled |
State | HTML attribute — reduced opacity, no pointer events |
Accessibility
| Feature | Details |
|---|---|
| Role | Use <button> for actions, <a> for navigation |
| Keyboard | Enter and Space activate the button |
| Focus | Visible focus ring via :focus-visible |
| Disabled | Use disabled attribute — removes from tab order automatically |
| Icon-only | Add aria-label to describe the action when there is no visible text |