shadcn

Button

Buttons 64

About

Displays a button or a component that looks like a button.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Button to your project and fits it to your theme.

Code

How Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Link from "next/link"
import { ChevronRight, Loader2, Mail } from "lucide-react"

import { Button } from "@/components/ui/button"

function ButtonDemo() {
  return <Button>Button</Button>
}

function ButtonSecondary() {
  return <Button variant="secondary">Secondary</Button>
}

function ButtonDestructive() {
  return <Button variant="destructive">Destructive</Button>
}

function ButtonOutline() {
  return <Button variant="outline">Outline</Button>
}

function ButtonGhost() {
  return <Button variant="ghost">Ghost</Button>
}

function ButtonLink() {
  return <Button variant="link">Link</Button>
}

function ButtonIcon() {
  return (
    <Button variant="outline" size="icon">
      <ChevronRight className="h-4 w-4" />
    </Button>
  )
}

function ButtonWithIcon() {
  return (
    <Button>
      <Mail className="mr-2 h-4 w-4" /> Login with Email
    </Button>
  )
}

function ButtonLoading() {
  return (
    <Button disabled>
      <Loader2 className="mr-2 h-4 w-4 animate-spin" />
      Please wait
    </Button>
  )
}

function ButtonAsChild() {
  return (
    <Button asChild>
      <Link href="/login">Login</Link>
    </Button>
  )
}

export default {
  ButtonDemo,
  ButtonSecondary,
  ButtonDestructive,
  ButtonOutline,
  ButtonGhost,
  ButtonLink,
  ButtonIcon,
  ButtonWithIcon,
  ButtonLoading,
  ButtonAsChild,
}

Dependencies

More by shadcn

View all
  • Navigation menu

    Navigation menu

    771
  • Calendar with time pressets

    Calendar with time pressets

    504
  • Sidebar

    Sidebar

    339
  • Sonner

    Sonner

    231
  • Chart

    Chart

    216
  • Icons

    Icons

    178
  • Dropdown Menu

    Dropdown Menu

    149
  • Calendar with event slots

    Calendar with event slots

    116

More in Buttons

View all
  • Button

    Button

    14
  • Texture Button

    Texture Button

    92
  • Button

    Button

    34
  • Button Save

    Button Save

    46
  • Button Group

    Button Group

    3
  • Button

    Button

  • App Store Button

    App Store Button

    453
  • Notification Button

    Notification Button

    103