Components
Burn to Delete
Installation
Works once the @useplanes registry is set up in your project (one-time). After that, copy and run commands directly.
pnpm dlx shadcn add @useplanes/burn-to-deleteUnlock with Planes Pro
$129 once · 231 Pro components · lifetime updates.
import { BurnToDelete } from "@/components/ui/BurnToDelete";
const [deleted, setDeleted] = useState(false);
<BurnToDelete
name={file.name}
burned={deleted}
onBurnedChange={setDeleted}
onBurn={() => moveToTrash(file.id)}
>
<p className="text-[28px] font-semibold text-stone-900">{file.title}</p>
<div data-rule className="my-6 h-px bg-stone-900/12" />
<p className="text-[15px] text-stone-700">{file.excerpt}</p>
</BurnToDelete>Examples
Set up UI SDK
The press and hold behavior comes from UI SDK, which needs React 19 and one line at the top of your global stylesheet so your own classes win over its small built-in styles.
@layer ui-sdk;
@import "tailwindcss";Delete on the server, with Undo
Move the file to the trash when the page has burned, and restore it if the person presses Undo.
<BurnToDelete
name={file.name}
onBurn={() => void api.trash(file.id)}
onBurnedChange={(deleted) => {
if (!deleted) void api.restore(file.id);
}}
/>Use cases
File and document managers
Deleting a file, with an Undo that brings it back from the ashes.
Notes, drafts and posts
Discarding something you wrote, where a mistake should be one press away from fixed.
Confirming a permanent delete
Press and hold as the confirmation, with the scorch mark growing under the finger.