---
title: "Base Button"
description: "Free animated React button with a subtle spring press, optional ripple, variants and sizes. A drop-in base for any app. Framer Motion, Tailwind, shadcn install."
category: "Components"
parent: "https://beui.dev/components/motion/button"
publishedAt: "2026-05-17"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/motion/button/base"
markdown: "https://beui.dev/components/motion/button/base.md"
license: "MIT"
---

# Base Button

> Free animated React button with a subtle spring press, optional ripple, variants and sizes. A drop-in base for any app. Framer Motion, Tailwind, shadcn install.

## Install

```bash
npx shadcn@latest add @beui/button-base
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Button usage

Subtle press scale, ripple, variants and sizes.

```tsx
"use client";

import { ArrowRight, Download, Trash2 } from "lucide-react";
import { Button } from "@/components/motion/button";

export function ButtonBasePreview() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex flex-wrap items-center justify-center gap-3">
        <Button sound variant="primary" size="md">
          Continue
          <ArrowRight className="h-4 w-4" />
        </Button>
        <Button sound variant="secondary" size="md">
          <Download className="h-4 w-4" />
          Download
        </Button>
        <Button sound variant="outline" size="md">Outline</Button>
        <Button sound variant="ghost" size="md">Ghost</Button>
      </div>
      <div className="flex flex-wrap items-center justify-center gap-3">
        <Button sound variant="primary" size="sm">Small</Button>
        <Button sound variant="primary" size="md">Medium</Button>
        <Button sound variant="primary" size="lg">Large</Button>
        <Button sound variant="secondary" size="icon" aria-label="Delete">
          <Trash2 className="h-4 w-4" />
        </Button>
      </div>
      <div className="flex flex-wrap items-center justify-center gap-3">
        <Button sound variant="primary" size="md" ripple>Ripple</Button>
        <Button sound variant="outline" size="md" ripple>Tap me</Button>
      </div>
    </div>
  );
}
```

## API Reference

### Button

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` | — | No | Classes merged onto the root element. |
| `size` | `"sm" \| "md" \| "lg" \| "icon"` | `md` | No | Height and padding; "icon" is a square icon-only button. Default: "md" |
| `variant` | `"outline" \| "primary" \| "secondary" \| "ghost"` | `primary` | No | Visual style: filled, card, ghost or outline. Default: "primary" |
| `pressScale` | `number` | `0.97` | No | Scale while pressed. Default 0.97: subtle, so the press reads as feedback, not a squash. |
| `ripple` | `boolean` | `false` | No | Spawn a Material-style ripple from the press point. Off by default. |
| `sound` | `boolean` | `false` | No | Play a soft press sound. Off by default; a `SoundProvider` can mute it app-wide. |

### ButtonLink

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` | — | No | Classes merged onto the root element. |
| `size` | `"sm" \| "md" \| "lg" \| "icon"` | `md` | No | Height and padding; "icon" is a square icon-only link. Default: "md" |
| `variant` | `"outline" \| "primary" \| "secondary" \| "ghost"` | `primary` | No | Visual style: filled, card, ghost or outline. Default: "primary" |
| `pressScale` | `number` | `0.97` | No | Scale while pressed. Default 0.97. |

## More in Button

- [Metallic Button](https://beui.dev/components/motion/button/metallic.md)
- [Stateful Button](https://beui.dev/components/motion/button/stateful.md)
- [Magnetic Button](https://beui.dev/components/motion/button/magnetic.md)

## Source

- Registry detail: https://beui.dev/r/button-base
- Raw source: https://beui.dev/r/button-base/raw
- GitHub: https://github.com/starc007/ui-components
