---
title: "Button"
description: "An accessible button in variants from primary to ghost and link, in several sizes, including icon-only buttons. Built on Base UI."
plan: Free
docs: https://ui.edbn.me/docs/components/button
---

# Button

An accessible button in variants from primary to ghost and link, in several sizes, including icon-only buttons. Built on Base UI.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/button.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0, class-variance-authority@^0.7.1
- edbn: edbn-base

## Usage

```tsx examples/button-basic.tsx
"use client";
import { ArrowUp, Trash2 } from "lucide-react";
import { Button } from "@/components/ui/button";

export default function ButtonBasicPreview() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Button>Continue</Button>
      <Button variant="outline">Cancel</Button>
      <Button variant="ghost-destructive" size="icon" aria-label="Delete">
        <Trash2 />
      </Button>
      <Button shape="round" size="icon" aria-label="Send">
        <ArrowUp />
      </Button>
    </div>
  );
}
```

## Files
- components/ui/button.tsx (99 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
