Dust delete (Pro)
ProIncluded in $99Delete a file and it turns to dust that blows into the trash.
On this page
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
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
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
| Prop | Type | Notes |
|---|---|---|
items | { id, name, detail?, icon?, tint?, size? }[] | size in bytes, for the total |
onDelete | (id: string) => void | After Undo runs out |
title | ReactNode | |
onOpenTrash | () => void | The trash button |
trashCount | number | Already in the trash, for the bin's count |
undoMs | number | Default 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.