Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A cassette tape whose reels turn and wind the tape from one side to the other as it plays.
npx shadcn@latest add @venusui/cassette-playerRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/cassette-player.tsxThe code behind the preview above.
cassette-player-demo.tsx
import { CassettePlayer } from "@/components/ui/cassette-player"
// The track and artist are made up.
export default function CassettePlayerDemo() {
return <CassettePlayer className="w-[min(26rem,calc(100vw-3rem))]" title="Summer ’98 mixtape" artist="for Sam, from Jo" duration={214} />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| title, artist | string | — | Handwritten on the label and shown under the tape. |
| duration | number | 214 | Track length in seconds; the tape winds across it. |
| side | string | "A" | Printed on the label. |
| accent | string | oklch(0.72 0.17 35) | Label stripe color: any CSS color. |
| playing, defaultPlaying | boolean | — | Controlled or initial playing state. |
| onPlayingChange | (playing: boolean) => void | — | Called on play, pause and when the track ends. |
All <div> props.
lucide-react for the controls. React 19 and Tailwind CSS v4.onPlayingChange to your own <audio> element.w-96).Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
A lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.
Stacked cards with the next ones peeking out; Next sends the top card to the back.