Core Components

Button

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

import { ArrowUpIcon } from "@phosphor-icons/react"
import { Button } from "@/components/ui/button"

export function ButtonDemo() {
  return (
    <div className="flex flex-wrap items-center gap-2 md:flex-row">
      <Button>Button</Button>
      <Button variant="outline" size="icon" aria-label="Submit">
        <ArrowUpIcon />
      </Button>
    </div>
  )
}

Installation

Install with the shadcn CLI. An AI assistant with the shadcn MCP server configured can also install components automatically when you ask for them (see Getting Started).

npx shadcn@latest add button

Documentation

For all options, variants and the full API, see the shadcn/ui docs.

Last updated on

On this page