KQ-1643 · SPACE/RECLAIM
Space Reclaim
A storage clean-up surface: a quota bar drawn per file type in one hue sits over the scan's biggest files, ranked by size with proportional bars, types and last-opened ages. Choosing a file lifts its chip out of the row and flies it into the To remove tray on springs.glide while a striped reclaimable part grows inside that type's segment of the quota bar; Remove drains each segment by exactly its stripe on glide as the used figure rolls down and the removed rows fold away — calm, never bouncy, because it is a deletion. The list is a multi-select listbox: arrows move, Space chooses, Shift extends a range, Enter opens, K keeps a file out of the suggestions, Delete goes to Remove and Escape clears.
Storage
Coldbrook workspace
Scanned 3 min ago · 14 suggestions
171.4 GB of 200.0 GB used
28.6 GB free
- Video27.0 GB
- Archive23.5 GB
- Data5.9 GB
- Image5.0 GB
- Design3.4 GB
- Document1.5 GB
- Everything else
Largest first
66.2 GB
Space chooses a file, Shift with Space or an arrow chooses a range. Enter opens it, K keeps it out of the suggestions, Delete goes to Remove, Escape clears.
2 files27.1 GB
2 files chosen · 27.1 GB to free · 171.4 of 200.0 GB used
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/space-reclaim
Props
- files
- SpaceReclaimFile[]
- default defaultSpaceReclaimFiles
- The scan's candidates: { id, name, folder, type, size, lastOpened } with sizes in bytes and lastOpened in ms or null.
- quota
- { total: number; used: number }
- default defaultSpaceReclaimQuota
- The drive's size and everything in use, in bytes.
- selected / defaultSelected
- string[]
- default — / []
- File ids chosen for removal, controlled or initial.
- onSelectedChange
- (ids: string[]) => void
- default —
- Fires from the click or key that changed the selection.
- onReclaim
- (ids: string[], bytes: number) => void | Promise<unknown>
- default —
- Remove was confirmed. Return a promise to show the removal; a rejection keeps the selection and says nothing was removed.
- onSkip
- (file) => void
- default —
- A file was kept out of the suggestions (Keep, or K); it folds out of the list and nothing is deleted.
- onOpen
- (file) => void
- default —
- A file was opened (Open, or Enter).
- onRescan
- () => void
- default —
- Rescan or Retry was pressed.
- status
- "ready" | "scanning" | "error"
- default "ready"
- Scanning shows progress and skeleton rows; error keeps the last results under a banner with Retry.
- scanProgress
- number
- default 0
- How far a running scan has got, 0 to 1.
- scanPath
- string
- default —
- The folder a running scan is reading, or where a failed one stopped.
- scannedAt
- number
- default three minutes before now
- When the last scan finished, in ms.
- now
- number
- default defaultSpaceReclaimNow
- The moment ages count from, in ms; never read from the clock during render.
- barStyle
- "bar" | "line" | "blocks"
- default "bar"
- How the quota and size bars are drawn: rounded bars, thin rules, or bars cut into cells.
- density
- "compact" | "cozy" | "roomy"
- default "cozy"
- Row height: one line, a meta line, or a meta line with the folder.
- tone
- "cobalt" | "moss" | "amber" | "ink"
- default "cobalt"
- The hue the quota family, the stripes, the checks and the size bars are drawn in.
- title
- string
- default "Coldbrook workspace"
- The workspace's name and the surface's accessible name.
- height
- number
- default 540
- Height of the surface in px; the list scrolls inside it.
- disabled
- boolean
- default false
- Nothing can be chosen, kept, opened or removed; the surface dims.
- className
- string
- default —
- Classes for the outer surface.
| Prop | Type | Default | Description |
|---|---|---|---|
| files | SpaceReclaimFile[] | defaultSpaceReclaimFiles | The scan's candidates: { id, name, folder, type, size, lastOpened } with sizes in bytes and lastOpened in ms or null. |
| quota | { total: number; used: number } | defaultSpaceReclaimQuota | The drive's size and everything in use, in bytes. |
| selected / defaultSelected | string[] | — / [] | File ids chosen for removal, controlled or initial. |
| onSelectedChange | (ids: string[]) => void | — | Fires from the click or key that changed the selection. |
| onReclaim | (ids: string[], bytes: number) => void | Promise<unknown> | — | Remove was confirmed. Return a promise to show the removal; a rejection keeps the selection and says nothing was removed. |
| onSkip | (file) => void | — | A file was kept out of the suggestions (Keep, or K); it folds out of the list and nothing is deleted. |
| onOpen | (file) => void | — | A file was opened (Open, or Enter). |
| onRescan | () => void | — | Rescan or Retry was pressed. |
| status | "ready" | "scanning" | "error" | "ready" | Scanning shows progress and skeleton rows; error keeps the last results under a banner with Retry. |
| scanProgress | number | 0 | How far a running scan has got, 0 to 1. |
| scanPath | string | — | The folder a running scan is reading, or where a failed one stopped. |
| scannedAt | number | three minutes before now | When the last scan finished, in ms. |
| now | number | defaultSpaceReclaimNow | The moment ages count from, in ms; never read from the clock during render. |
| barStyle | "bar" | "line" | "blocks" | "bar" | How the quota and size bars are drawn: rounded bars, thin rules, or bars cut into cells. |
| density | "compact" | "cozy" | "roomy" | "cozy" | Row height: one line, a meta line, or a meta line with the folder. |
| tone | "cobalt" | "moss" | "amber" | "ink" | "cobalt" | The hue the quota family, the stripes, the checks and the size bars are drawn in. |
| title | string | "Coldbrook workspace" | The workspace's name and the surface's accessible name. |
| height | number | 540 | Height of the surface in px; the list scrolls inside it. |
| disabled | boolean | false | Nothing can be chosen, kept, opened or removed; the surface dims. |
| className | string | — | Classes for the outer surface. |