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. Use buttons for primary actions, secondary actions, destructive operations, or as simple
text links depending on the visual hierarchy needs of your interface.
import { Button } from "@strongtie/design-system/button"<Button>| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | - | |
variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | - |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
CSS classes used by this component:
buttonEnsure proper accessibility attributes are added when implementing this component.