Triggers an action or navigates somewhere.

Base UI APISource

Installation

pnpm dlx shadcn@latest add https://yea-ui.vercel.app/r/button.json

Usage

import { Button, buttonVariants } from "@/components/ui/button"
<Button variant="secondary">Continue</Button>

Examples

Variants

Sizes

Pass a Link to render and turn off the native button element.

API reference

Button

PropTypeDefaultDescription
variant"primary" | "secondary" | "outline" | "ghost" | "negative" | "glass" | "link""primary"Visual style.
size"sm" | "md" | "lg" | "icon" | "icon-md""md"Height and padding. Icon sizes are square.
renderReactElement—Element to render instead of a button, such as a Link.
nativeButtonbooleantrueSet to false when render is not a native button.
disabledbooleanfalseBlocks interaction and applies the disabled style.

All other props are forwarded to the underlying Base UI component.