Button

A button component with multiple variants, sizes, and loading state.

Installation

tsx
npx smi-ui add button

Preview

Variants

Sizes

Loading

Usage

tsx
import { Button } from "@/components/ui/button"

export function Example() {
  return (
    <Button variant="default" size="default">
      Click me
    </Button>
  )
}

Props

PropTypeDefaultDescription
variantdefault | destructive | outline | secondary | ghost | linkdefaultThe visual style of the button
sizedefault | sm | lg | icondefaultThe size of the button
loadingbooleanfalseShows a loading spinner
asChildbooleanfalseRender as child component