Delete workspaceNew
A danger-zone delete with a ghost: as you type the name, Boo climbs out of the workspace’s tile, and holding Delete waves him off the stage.
Used forWorkspace settingsDelete accountProjectsRepositories and databases
Install with the shadcn CLI
Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/delete-workspace.json. More
Templates
Need the whole page?
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.
Where it’s used
Workspace settings
The danger zone at the bottom of a team’s settings.
Delete account
Closing a personal account, with a grace period to change your mind.
Projects
Removing a project and everything in it.
Repositories and databases
Anything that needs its exact name typed before it goes.
What it handles for you
A delete step usually relies on a bold warning nobody reads. This block makes the name you type and the hold you keep the warning itself, and it leaves a way back.
The exact name
Delete stays off until the name is typed exactly; a wrong letter visibly undoes progress.
A hold, not a click
Delete has to be held (1.5s by default), so a stray click or Enter never deletes anything.
What goes with it
consequences lists what’s lost, one short line each.
A way back
With onRestore the deleted state offers Restore and says how long it’s possible.
Failures kept in place
If onDelete throws, Boo drops back into view and the button offers another hold.
Its own tile
The workspace’s logo, or its initials on its colour, is what fades and empties.
Overview
Deleting a workspace is usually a red box, a sentence in bold and a field where you type the name. This one gives the moment its weight. The workspace’s own tile sits under a spotlight on the lit stage, and Boo, an illustrated ghost, lives inside it. Every letter of the name you type brings him further up out of the tile while the tile drains of colour; type a letter that doesn’t belong and he shivers and sinks back to where the name still matches. With the whole name right, Delete arms. Hold it and Boo waves goodbye and drifts up out of the stage over the hold; let go early and he drops back. Once it’s deleted the tile is an empty dashed outline, and a moment later Boo peeks up over the bottom edge of the stage. Restore brings him diving back into his tile, shy, as the colour comes back. Under the ghost it is a careful delete: nothing happens until the exact name is typed and the hold completes, the consequences are listed, and onDelete and onRestore are your endpoints.
States
- safe
- The workspace’s tile under a spotlight on the lit stage; “Northwind is safe and sound”. Boo is out of sight inside it.
- typing
- Each matching letter springs Boo further up out of the tile (worried, hands clasped, floating), while the tile turns grey and dims; “Northwind is fading”.
- wrong letter
- He shivers and sinks back to the part of the name that still matches.
- armed
- The whole name typed: Boo is fully out, the button turns red and reads Hold to delete; “Last chance for Northwind”.
- holding
- He switches to waving goodbye and drifts up out of the stage over the hold, slowly at first; releasing early springs him back.
- deleted
- Deleting → Deleted; the tile shrinks away into an empty dashed outline, the form folds into “Northwind was deleted” with Restore, and Boo peeks up over the bottom edge.
- restored
- Restore: Boo dives back down into his tile, shy and blushing, the colour floods back and the form returns empty.
- not deleted
- If onDelete throws, the button shows the error and Hold to try again, and Boo drops back into view.
Usage
Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.
Works with
Installs with it
- Hold to confirmA deliberate action, held for a moment: the ring fills, the label changes, and confirmation settles into a check.
- InputA one-line field with a label, hint and error that trade places, a clear button that folds in, and one shake when an error arrives.
- Status buttonSave, Saving, Saved: the spinner opens in, the check draws itself, errors shake, and the label morphs between them.
- Text morphText that changes the way it should: shared letters slide over, new ones rise out of a blur, the width eases.
With a grace period
Soft-delete on the server, restore within the window, and list what goes with it.
Props
- name
- string
- What has to be typed, exactly, before Delete arms.
- onDelete
- () => Promise<unknown>
- Delete it. Throw to keep it and offer another hold.
- onRestore
- () => Promise<unknown>
- Shows Restore after the delete; throw to say it didn’t work.
- consequences
- string[]
- What goes with it, one short line each.
- avatar / color= — / var(--chart-1)
- string
- Its logo, or the colour behind its initials.
- kind= "workspace"
- string
- The heading says Delete workspace, project, account…
- graceDays= 30
- number
- How long Restore is possible, in the line after the delete.
- holdMs= 1500
- number
- How long Delete has to be held.
Accessibility and motion
- The name field is a real labelled input; Delete is Hold to confirm, which works with the pointer, Space and Enter, and Escape or letting go cancels it.
- A status region says when the name matches and when the workspace was deleted.
- Boo is decoration (aria-hidden) and animated: worried, waving, shy and peeking are loops of frames cut from generated animations of his own art, shipped inside boo-art.ts as WebP strips (98KB), so the install is complete; his rise, shiver, hold, peek and dive are code on top.
- One frame loop outside React moves him and sleeps when he’s still; his frames play as Web Animations. The scene is drawn at 364 × 184 and scaled to the stage.
- With reduced motion he moves in place without travelling, and the form and tile change without slides.
- Built from Hold to confirm, Input, Status button and Text morph, which the CLI installs with it. No animation library.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
The CLI also installs Hold to confirm, Input, Status button, Text morph.
Source
Registry item: /r/delete-workspace.json


