Button
Pill button with default, outline, secondary and ghost variants plus four sizes.
class-variance-authority
Preview
Installation
Install the component using the CLI.
npx shadcn@latest add https://yash-sakre.github.io/Yash-Sakre/r/button.jsonUsage
Import the component:
import { Button } from "@/components/ui/button";Use it in your code:
<Button variant="default">Click me</Button>Props
| Property | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "outline" | "secondary" | "ghost" | "default" | Visual style. |
| size | "sm" | "default" | "lg" | "icon" | "default" | Height + horizontal padding. |
| ...props | ButtonHTMLAttributes | — | All native <button> attributes. |