Purge

Delete workspace

northwind
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-purge

About this component

A delete confirmation you have to mean: hold the button and it fills with small red cells from the left while the seconds count down, and letting go drains them. Hold to the end and the cells burst, the workspace row folds away and the card offers Undo.

Triggers

  • Click
  • State change
  • Card
  • Fill

Techniques

  • requestAnimationFrame
  • CSS transition
  • State machine
  • Gradient

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The hold button is a native button named Delete workspace. Press and hold for 1.6 seconds to confirm, and it works with Space or Enter held as well as a pointer; the title sits in an aria-live region so Workspace deleted is announced; Undo is a native button and focus returns to the hold button after it.

Reduced motion

The hold still fills the button (the fill is the feedback) but there is no burst and the row folds at once.

Use it in anything you build, commercial and client work included. Licence

More cards

See all

New checkout

Rolling out
RolloutGet code
3 lights on
RoomGet code
Authenticator

TokenGet code
Not tracking
  • Billing redesign
  • Onboarding copy
  • Sync notes
TrackerGet code