Component packs › Spool › Eject Modal
Press Eject and the smoked door swings out on a damped hinge while the cassette rises; the question and its answers are written on the label.
Eject Modal is a dialog from Spool, a component pack with 6 deck controls: Controls built from the mechanics of a tape deck: latching keys, reels, drums and a VU needle. Price: $2 for the whole pack.
Built with: damped hinge door, dialog on a cassette label, focus in and back out.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Question on the label. | |
body | string | One or two lines under it. | |
confirm | string | "Replace" | Confirm button. Default "Replace". |
cancel | string | "Keep" | Cancel button. Default "Keep". |
trigger | string | "Eject" | Trigger key label. Default "Eject". |
onConfirm | () => void | ||
onCancel | () => void | ||
onOpenChange | (open: boolean) => void | ||
dark | boolean | ||
autoplay | number | false | Showcase mode: opens and closes every N ms. |
readonly open: booleansetOpen(v: boolean): voiddestroy(): voidimport EjectModal from './EjectModal';
<EjectModal />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.