Skip to content
Sign upGet access
MicrointeractionsDust deleteMenu

Dust delete (Pro)

ProIncluded in $99

Delete a file and it turns to dust that blows into the trash.

ProDelete a file and it turns to dust grain by grain, rides the wind into the trash and the lid gulps it down; Undo pours it back out and the row rebuilds.

The row is drawn grain by grain from its own pixels, so the dust is its real colours in either theme. A sweep crosses it from the right and each grain lifts off as the sweep passes, rides a curling wind and is pulled into the trash, whose lid lifts while dust is in the air and gulps as it lands. The count on the bin ticks up and the totals roll down. Undo pours the dust back out of the bin along arcs and the row rebuilds itself from the left.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/dust-delete

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { DustDelete } from "@/components/ui/chatcn/pro/dust-delete"

<DustDelete title="Knowledge" items={files} onDelete={(id) => remove(id)} />

onDelete runs once Undo has run out, so remove the item there. Until then the row stays hidden inside the list and Undo brings it back.

Props

PropTypeNotes
items{ id, name, detail?, icon?, tint?, size? }[]size in bytes, for the total
onDelete(id: string) => voidAfter Undo runs out
titleReactNode
onOpenTrash() => voidThe trash button
trashCountnumberAlready in the trash, for the bin's count
undoMsnumberDefault 6000, counted once the dust has settled

Accessibility

  • Each row's button is labelled Delete and the file's name; the Moved to Trash note is a status, and focus moves to the next row when the delete came from the keyboard.

Motion

  • The sweep takes 620 ms and the dust lands in about 1.4 s; the row closes on a spring. Reduced motion: no dust, the row just closes.