Button

Form

A customizable button component with multiple variants and sizes. Built with accessibility in mind.

Installation

bash
1npx @dinachi/cli@latest add button

Run the CLI command above to automatically install the component and its dependencies.

Examples

Default Button

A basic button with default styling

Button Variants

Different button variants for various use cases

Button Sizes

Different button sizes for different contexts

API Reference

PropTypeDefaultDescription
variant
'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link''default'The visual style variant of the button
size
'default' | 'sm' | 'lg' | 'icon''default'The size of the button
asChild
booleanfalseChange the component to the HTML tag or custom component of the only child