---
title: "Tactile Button"
description: "A button with a flat face on a darker ledge, in any color. A press drops the face onto the ledge. One CSS variable sets the color."
url: https://gelatinui.com/components/tactile-button
markdown_url: https://gelatinui.com/components/tactile-button.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/tactile-button"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Tactile Button

> A button with a flat face on a darker ledge, in any color. A press drops the face onto the ledge. One CSS variable sets the color.

Page: https://gelatinui.com/components/tactile-button

## When to use it

Best for: One main action that must feel like a real key you press, in your brand color.

- Set `--tactile` and `--tactile-foreground` on the button or on a parent to set the color.
- Use `size="xl"` for the main action of a screen, and `TactileButtonChip` for a price or a count.
- Leave 4px of room under it: the ledge hangs below the button box and takes no layout room.

## When not to use it

- For the usual actions of a form or a toolbar, use a [Button](https://gelatinui.com/components/button.md).
- For an action that needs a long press to confirm, use a [Hold Button](https://gelatinui.com/components/hold-button.md).

## Notes for agents

- It is a Button: `busy`, `disabled`, `render` for a link, the focus ring, and the touch target pass through.
- `variant` is `solid` (default) or `outline`; `size` is `default`, `lg` (default), or `xl`.
- With no `--tactile`, the face uses the `primary` token.
- Special item: its ledge look is its own, not the base Button look.

## Anatomy

```text
TactileButton
└─ TactileButtonChip (0..n)
```

## API reference

### TactileButton

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `busy` | `boolean` |  | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. |
| `spinnerPlacement` | `"center" \| "start"` |  | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. |
| `glass` | `"clear" \| "dark" \| "light"` |  |  |
| `size` | `"default" \| "lg" \| "xl"` | "lg" |  |
| `variant` | `"outline" \| "solid"` | "solid" |  |

Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button

### TactileButtonChip

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TactileButton | `tactile-button` | `data-icon`, `data-loading-start` | `--border`, `--primary`, `--primary-foreground`, `--tactile`, `--tactile-color`, `--tactile-depth`, `--tactile-foreground` | `motion-timing` |
| TactileButtonChip | `tactile-button-chip` | `data-size`, `data-variant` | `--radius`, `--radius-lg`, `--radius-xl` |  |

## Usage

Set the color with `--tactile` on the button or a parent, and put a price or a count in `TactileButtonChip`.

```tsx title="get-pro-button.tsx"
import { TactileButton, TactileButtonChip } from "@/components/ui/pro/tactile-button";

export function GetProButton() {
  return (
    <TactileButton size="xl" className="[--tactile-foreground:white] [--tactile:#e5322d]">
      Get Pro
      <TactileButtonChip>$149</TactileButtonChip>
    </TactileButton>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/tactile-button
```

It adds 10 registry items: 7 files, 1509 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Button](https://gelatinui.com/components/button.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Button](https://gelatinui.com/components/button.md)
- [Copy Button](https://gelatinui.com/components/copy-button.md)
- [Spinner](https://gelatinui.com/components/spinner.md)
- [Hold Button](https://gelatinui.com/components/hold-button.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Enter | Presses the button. |
| Space | Presses the button. |

## Motion

| Part | Motion |
| --- | --- |
| Press | press · 100ms · the face moves down by the ledge depth (3px or 4px), the ledge stays still |
