All registry items
primitives/r/tonal-button.json
Tonal Button
Automatically adapts between Soft Pill and Commerce corners.
Tonal Button
Toggle Tablet or Mobile for real isolated iframe breakpoints, or switch to Code for full source.
Installation
npx shadcn@latest add https://tonal.harlo.dev/r/tonal-button.jsonDependencies
Tonal Registry Dependencies
npm Packages
clsxtailwind-merge
Usage
import { TonalButton } from "@/components/tonal/button";
export function Actions() {
return (
<div className="flex gap-3">
<TonalButton>Primary CTA</TonalButton>
<TonalButton variant="outline">Secondary</TonalButton>
</div>
);
}Props & Tokens API
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "dark" | "outline" | "tonal" | "ghost" | "primary" | Visual emphasis tier. |
| size | "sm" | "md" | "lg" | "md" | Padding and font size scale. |
| ...props | ButtonHTMLAttributes | — | All native HTML button attributes and ref forwarding. |