Shadcn UI Components

Button

Displays a button or a component that looks like a button. Built on top of Radix UI primitives with full keyboard navigation and accessibility support.


Button Variants

The button component supports multiple variants for different use cases: default, destructive, outline, secondary, ghost, and link.

Variants

Sizes

With Icons

Icon Buttons

Loading State

Disabled State

Installation

# The component is already installed at:
# src/components/ui/shadcn/button.tsx

Usage

import { Button } from '@/components/ui/shadcn/button'

export function ButtonDemo() {
  return (
    <Button variant="outline">Button</Button>
  )
}

Props

PropTypeDefaultDescription
variantdefault | destructive | outline | secondary | ghost | linkdefaultThe visual style of the button
sizedefault | sm | lg | icondefaultThe size of the button
asChildbooleanfalseMerge props onto child element
Previous
Breadcrumb