Getting Started
Foundations
Components
Search for a command to run...
Buttons are fundamental UI components used to initiate actions, submit forms, or navigate to different views. They come in various visual styles (variants) to indicate importance and different sizes to accommodate various layouts. Buttons support full keyboard navigation and accessibility features, including proper focus management and ARIA attributes.
The component supports rendering as a child element via the asChild prop, allowing you
to apply button styling to links, custom components, or other interactive elements while
maintaining proper semantics.
import { Button } from "@strongtie/design-system/button"<Button>| Prop | Type | Default | Description |
|---|---|---|---|
size | default | sm | lg | icon | 'default' | The size of the button, affecting padding and font size. |
variant | default | destructive | outline | secondary | ghost | link | 'default' | The visual style variant of the button. |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
button
variant (default: default)
| Value | Classes |
|---|---|
default | -default |
destructive | -destructive |
outline | -outline |
secondary | -secondary |
ghost | -ghost |
link | -link |
size (default: default)
| Value | Classes |
|---|---|
default | -md |
sm | -sm |
lg | -lg |
icon | -icon |
The following data attributes are used to identify component parts:
buttonEnsure proper accessibility attributes are added when implementing this component.