# Balloon Button

> An inflated, half-balloon button drawn with a WebGL shader, with folds along its seam and a springy dent when pressed.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Buttons |
| Live preview | https://uibrik.com/components/balloon-button |
| Writes | 1 file into `components/uibrik/balloon-button/` |
| Packages | `three` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/balloon-button.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/balloon-button`.

Can't run commands? https://uibrik.com/components/balloon-button/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { BalloonButton } from "@/components/uibrik/balloon-button/balloon-button";

<BalloonButton
  label="Balloon Button"
  color="#000000"
  radius={18}
  puff={0.7}
  creaseSpacing={14}
  creaseDepth={0.4}
  bounce={0.2}
  onClick={(event) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/balloon-button.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` | `"Balloon Button"` | Button text. |
| `color` | `string` | `"#000000"` | Balloon colour. |
| `radius` | `number` | `18` | Corner radius. |
| `puff` | `number` | `0.7` | How far the surface swells. |
| `creaseSpacing` | `number` | `14` | Distance between folds along the edge. |
| `creaseDepth` | `number` | `0.4` | How deep the folds pinch in. |
| `bounce` | `number` | `0.2` | How far the dent springs back past rest on release. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `onClick` | `MouseEventHandler<HTMLButtonElement>` |  | Called on click, like any button. |
| `className` | `string` |  | Classes for the button. |

## Where it fits

- **Consumer app actions**: An inflated button that dents when pressed makes a main action in a playful app feel tactile.
- **Kids and game products**: Soft folds and a springy press suit brands where fun matters more than restraint.
- **Bold landing page CTAs**: A WebGL-shaded button stands out from flat buttons when one call to action must win attention. Pairs with [Soft Button](https://uibrik.com/components/soft-button.md).

## Same shelf: Buttons

- [Bookmark Button](https://uibrik.com/components/bookmark-button.md): A save button whose bookmark fills from the top like a dropped ribbon while the label rolls to Saved.
- [Chain Copy](https://uibrik.com/components/chain-copy.md): A copy-link button whose chain icon snaps apart when pressed, flings two chips from the break, then swings back together and relinks as the label rolls to Copied.
- [Copy Button](https://uibrik.com/components/copy-button.md): A copy button whose two sheets slide together into a check while the label rolls to Copied.
- [Expand Button](https://uibrik.com/components/expand-button.md): An icon-only button that springs open to reveal its label on hover or keyboard focus.
- [Hold to Confirm](https://uibrik.com/components/hold-to-confirm.md): A destructive-action button that has to be held down; a fill grows across it and drains back if released early.
- [Inline Confirm](https://uibrik.com/components/inline-confirm.md): A destructive button that splits into Cancel and Confirm in its own footprint, so nothing around it moves.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/balloon-button/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
