Docs
Button

Button

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

Installation

npx shadcn-ui add button
npx shadcn-ui add button

Usage

import { Button } from "@/components/ui/button"
import { Button } from "@/components/ui/button"
<Button variant="outline">Button</Button>
<Button variant="outline">Button</Button>

You can use the buttonVariants helper to create a link that looks like a button.

import { buttonVariants } from "@/components/ui/button"
import { buttonVariants } from "@/components/ui/button"
<Link className={buttonVariants({ variant: "outline" })}>Click here</Link>
<Link className={buttonVariants({ variant: "outline" })}>Click here</Link>

Examples

Primary


Secondary


Destructive


Outline


Ghost



With Icon


Loading