---
name: "@sureui"
slug: "sureui"
description: "Open source confirmation components for shadcn/ui: undo, hold to confirm, type to confirm and more. Built on Base UI."
category: "AI/chat UI"
tags: ["ai", "buttons", "media", "navigation", "overlays", "payments"]
framework: "react"
license: "MIT"
author: "aidankmcalister"
website: "https://sureui.com"
github: "https://github.com/aidankmcalister/sureui"
registry: "https://sureui.com/r/registry.json"
pro: false
pro_url: null
github_stars: 1
component_count: 21
generated_at: "2026-10-10T06:32:55.998Z"
---

# @sureui

Open source confirmation components for shadcn/ui: undo, hold to confirm, type to confirm and more. Built on Base UI.

## Links

- Website: https://sureui.com
- GitHub: https://github.com/aidankmcalister/sureui
- Registry JSON: https://sureui.com/r/registry.json
- Directory page: https://sh4dcn.vercel.app/registry/sureui
- This file: https://sh4dcn.vercel.app/md/sureui.md

## Install

```sh
# add the whole registry (shadcn CLI)
npx shadcn@latest add https://sureui.com/r/registry.json
pnpm dlx shadcn@latest add https://sureui.com/r/registry.json
bunx shadcn@latest add https://sureui.com/r/registry.json
# clone the source repo
git clone https://github.com/aidankmcalister/sureui.git
# fetch the raw registry index
curl -s https://sureui.com/r/registry.json
```

## Components (21)

| name | type | description | install |
| --- | --- | --- | --- |
| confirm-button | registry:ui | A Button that confirms on a click, a second click or a press and hold. Supports inline undo and a pending state for an async onConfirm. | `npx shadcn@latest add https://sureui.com/r/confirm-button.json` |
| confirm-menu-item | registry:ui | A DropdownMenu or ContextMenu item that confirms on a click, a second click or a press and hold. The menu stays open while the item is armed, held, pending or … | `npx shadcn@latest add https://sureui.com/r/confirm-menu-item.json` |
| confirm-switch | registry:ui | A Switch that moves right away and can be taken back: flipping it again during the undo window undoes it, and onConfirm(checked) runs when the window ends. | `npx shadcn@latest add https://sureui.com/r/confirm-switch.json` |
| type-to-confirm | registry:ui | An inline form that calls onConfirm only after the exact phrase is typed and every acknowledgement is checked. Supports inline undo and a pending state for an … | `npx shadcn@latest add https://sureui.com/r/type-to-confirm.json` |
| confirm-dialog | registry:ui | An alert dialog with a ConfirmButton or TypeToConfirm as its confirm action, which closes only after an async onConfirm settles. Includes useConfirm, which ret… | `npx shadcn@latest add https://sureui.com/r/confirm-dialog.json` |
| confirm-popover | registry:ui | A popover anchored to any trigger, with one line about the consequence and a ConfirmButton, for actions that need a sentence but not a dialog. It stays open wh… | `npx shadcn@latest add https://sureui.com/r/confirm-popover.json` |
| consequences | registry:ui | A list of what a confirmation will remove, with counts and names that collapse to "and N more". Pass it to TypeToConfirm or ConfirmDialog through their consequ… | `npx shadcn@latest add https://sureui.com/r/consequences.json` |
| undo-toast | registry:lib | undoToast(message) shows a Sonner toast with an Undo button. It resolves true when the toast closes and false if Undo is clicked, so run the action only on tru… | `npx shadcn@latest add https://sureui.com/r/undo-toast.json` |
| undoable | registry:ui | Wraps a list item or table row. Removing it collapses the row in place to a label and an Undo button at the same height, then runs onConfirm when the undo wind… | `npx shadcn@latest add https://sureui.com/r/undoable.json` |
| unsaved-changes | registry:ui | useUnsavedChanges asks before unsaved changes are lost: the browser's prompt on reload or close, an awaitable confirmLeave() for leaving a page, and Keep editi… | `npx shadcn@latest add https://sureui.com/r/unsaved-changes.json` |
| tool-approval | registry:ui | Approve or deny an AI SDK tool call, or a batch of them, with a gesture that matches its risk: undo for low, click again for medium, hold for high and a typed … | `npx shadcn@latest add https://sureui.com/r/tool-approval.json` |
| danger-zone-01 | registry:block | A project settings danger zone: pause deployments with an undo window, transfer the project in a dialog that shows what changes, and delete it in a dialog that… | `npx shadcn@latest add https://sureui.com/r/danger-zone-01.json` |
| api-keys-01 | registry:block | A list of API keys with the last time each was used, hold to revoke, and a Create key dialog that shows the new secret once with a copy button. | `npx shadcn@latest add https://sureui.com/r/api-keys-01.json` |
| delete-account-01 | registry:block | An account deletion screen with an export link first, a list of what gets deleted, and a form that unlocks after you type your email and check each acknowledge… | `npx shadcn@latest add https://sureui.com/r/delete-account-01.json` |
| team-members-01 | registry:block | A team members list whose row menu removes someone after a second click, and makes someone the owner after a dialog explains what changes. | `npx shadcn@latest add https://sureui.com/r/team-members-01.json` |
| file-manager-01 | registry:block | A file list where selected files move to trash with an undo toast, a Trash tab restores them one at a time, and an Empty trash dialog lists what goes and asks … | `npx shadcn@latest add https://sureui.com/r/file-manager-01.json` |
| inbox-01 | registry:block | A message list where archive and delete collapse the row in place with an Undo, and a reading pane whose toolbar archives on a second click and deletes on a ho… | `npx shadcn@latest add https://sureui.com/r/inbox-01.json` |
| agent-approval-01 | registry:block | An agent turn with four tool calls waiting for approval, from a low-risk message that approves with undo to a critical delete that asks for the project name. E… | `npx shadcn@latest add https://sureui.com/r/agent-approval-01.json` |
| bulk-actions-01 | registry:block | An issue list with row checkboxes whose delete asks for more as the count grows: an undo window for one or two, a second click for a few, and the typed count f… | `npx shadcn@latest add https://sureui.com/r/bulk-actions-01.json` |
| settings-save-bar-01 | registry:block | A team settings form where any edit brings up a save bar. Discard asks for a second click, and leaving the page with unsaved changes asks whether to save, disc… | `npx shadcn@latest add https://sureui.com/r/settings-save-bar-01.json` |
| cancel-subscription-01 | registry:block | A plan card whose cancel dialog lists what goes away and when, offers a cheaper plan instead, and cancels on a second click. | `npx shadcn@latest add https://sureui.com/r/cancel-subscription-01.json` |

## For AI agents

```text
You are adding components from @sureui to a shadcn-compatible project.
1. Read this file (https://sh4dcn.vercel.app/md/sureui.md) for the component list.
2. Fetch the machine-readable index: https://sureui.com/r/registry.json
3. Install a single component with its install command from the table above.
4. Full structured record: https://sh4dcn.vercel.app/json (library slug: sureui).
```
