Componentform0.68 KB gzipZero dependencies
Button
Animated button with hover feedback and crisp focus.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add buttonOr install the full npm package:
npm install bigbulluiUsage
tsx4 lines
import { Button } from "@/components/ui/button"; <Button>Admit one</Button><Button variant="outline" size="lg">Outline</Button>Source code
button.tsx + 3 helpersZero third-party dependencies (4 local files shown in tabs below).
tsxbutton.tsx79 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils";import { Slot } from "./lib/slot"; type Variant = "default" | "destructive" | "secondary" | "outline" | "ghost" | "link";type Size = "default" | "sm" | "lg" | "icon"; export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & { variant?: Variant; size?: Size; asChild?: boolean; /** Dual-mode: false renders instantly with no motion. Default true. */ animated?: boolean;}; const variants: Record<Variant, string> = {Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Button } from "@/components/ui/button"; <Button />| Prop | Type | Description |
|---|---|---|
| variant | Variant | Visual style. |
| size | Size | Size of the button. |
| asChild | boolean | Merges props onto the single child element instead of wrapping. (Default: false) |
| animated | boolean | Dual-mode: false renders instantly with no motion. Default true. |
Pairs well with
Button GroupJoins buttons with rounded outer corners, internal separators, and sliding hover highlight.Loading ButtonButton with loading spinner swap, width locking to avoid jumps, and a brief success check-mark stamp.Split ButtonDual-action button with primary click trigger and dropdown secondary actions.Input GroupInput with prefix icon slot, suffix slot, and inner action button; dashed focus ring and animated underline sweep.