# Inline Confirm

> A destructive button that splits into Cancel and Confirm in its own footprint, so nothing around it moves.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Buttons |
| Live preview | https://uibrik.com/components/inline-confirm |
| Writes | 1 file into `components/uibrik/inline-confirm/` |
| Packages | `@tabler/icons-react`, `motion`, `react-use-measure` (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/inline-confirm.json
```

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

Can't run commands? https://uibrik.com/components/inline-confirm/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 { InlineConfirm } from "@/components/uibrik/inline-confirm/inline-confirm";

<InlineConfirm
  label="Delete"
  confirmLabel="Confirm"
  cancelLabel="Cancel"
  color="#dc2626"
  timeout={4}
  size="md"
  icon
  cancelSide="start"
  radius={12}
  onConfirm={() => {}}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` | `"Delete"` | Button text. |
| `confirmLabel` | `string` | `"Confirm"` |  |
| `cancelLabel` | `string` | `"Cancel"` |  |
| `color` | `string` | `"#dc2626"` | Colour of the destructive action. |
| `timeout` | `number` | `4` | How long an unanswered prompt waits before backing out. 0 waits forever. |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Height, padding and text size. |
| `icon` | `boolean` | `true` | Show the trash icon beside the label. |
| `cancelSide` | `"start" \| "end"` | `"start"` | Which side Cancel grows out on. |
| `radius` | `number` | `12` | Corner radius. |

## Wire it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `onConfirm` | `() => void` |  | Called when the action is confirmed. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Delete in lists and tables**: Splitting into Cancel and Confirm in its own footprint avoids a modal for small deletions. Pairs with [Hold to Confirm](https://uibrik.com/components/hold-to-confirm.md).
- **Removing members or files**: Nothing around the button moves, so the confirm appears exactly under the user's pointer. Pairs with [Invite Members](https://uibrik.com/components/invite-members.md) (Pro).
- **Compact cards**: Card footers with no room for a dialog still get a safe confirmation step.

## Same shelf: Buttons

- [Mesh Button](https://uibrik.com/components/mesh-button.md) (Pro): A button painted with a softly blended mesh gradient under rolling silk waves that catch a satin sheen; the pointer presses into the silk and a click ripples it.
- [Prism Button](https://uibrik.com/components/prism-button.md) (Pro): A graphite button with a border of polished metal that splits light like a prism; the glint travels round the border and turns to follow the pointer.
- [Share Menu](https://uibrik.com/components/share-menu.md): A share button that flips open into a pill of options, resizing to fit.
- [Soft Button](https://uibrik.com/components/soft-button.md): A plain button made with care: a gentle top-to-bottom gradient, a faint inner highlight and shade, and a crisp border, in primary, secondary and accent.
- [Split Button](https://uibrik.com/components/split-button.md): A primary button with a menu of alternative actions; the chosen one rolls into the main label.
- [Stepper Button](https://uibrik.com/components/stepper-button.md): An add-to-cart button that reshapes into a quantity stepper in the same pill.

## Ground rules

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