Getting Started
All Components
Playground
Pick a variant and size, toggle disabled, and edit the children. The snippet below the preview matches the rendered button exactly.
<Button>Click me</Button>Props
Installation
npx shadcn@latest add https://tentui.com/r/button.json
Usage
import { Button } from "@/components/ui/button";
export function Example() {
return <Button>Click me</Button>;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "ghost" | "destructive" | "link" | "default" | Visual treatment. |
size | "default" | "sm" | "lg" | "icon" | "default" | Sizing token. Use icon when the children are a single glyph. |
asChild | boolean | false | Render the children as the styled element instead of a <button> (Radix Slot). |
disabled | boolean | false | Disables pointer events and dims the button. |
className | string | — | Forwarded to the rendered element. Use to extend or override the default styles. |
All other native <button> attributes are forwarded.
Polymorphism with asChild
Wrap any element — usually next/link — and the button styles transfer onto it without nesting an interactive element inside another.
import Link from "next/link";
import { Button } from "@/components/ui/button";
export function CTA() {
return (
<Button asChild>
<Link href="/get-started">Get started</Link>
</Button>
);
}