Button
A clickable button with variants and sizes; also exposes `buttonVariants` for styling links.
Updated
Variants
<Button>Default</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>Sizes
<Button size="sm">Small</Button>
<Button>Default</Button>
<Button size="lg">Large</Button>A clickable button with variants and sizes; also exposes buttonVariants for styling links.
Installation
railbase ui add button
Peer dependencies:
npm install class-variance-authority
Note
railbase ui add also copies shared primitives — they ship alongside this component automatically.
Usage
import { Button } from "@/lib/ui/button";
<Button>Click me</Button>
<Button variant="outline" size="sm">Small</Button>
<Button variant="destructive">Delete</Button>
Anatomy
Exported parts: buttonVariants · Button