Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A wood-cased CRT set: turn the channel knob through static, or switch it off to a closing line.
npx shadcn@latest add @venusui/retro-tvRun 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/retro-tv.tsxThe code behind the preview above.
retro-tv-demo.tsx
import { RetroTv } from "@/components/ui/retro-tv"
// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string, w: number, h: number) => `https://images.unsplash.com/photo-${id}?w=${w}&h=${h}&fit=crop&auto=format&q=80`
const channels = [
{ src: photo("1506905925346-21bda4d32df4", 800, 600), alt: "Snowy peaks above a sea of cloud", name: "Nature Hour" },
{ src: photo("1540959733332-eab4deabeeaf", 800, 600), alt: "A neon-lit street in Tokyo at night", name: "City Lights" },
{ src: photo("1504674900247-0877df9cc836", 800, 600), alt: "Plates of food on a wooden table", name: "Cooking Show" },
{ src: photo("1493225457124-a3eb161ffa5f", 800, 600), alt: "A singer on a smoky stage", name: "Live Music" },
]
export default function RetroTvDemo() {
return <RetroTv channels={channels} />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| channels | { src: string; alt: string; name: string }[] | — | Pictures for each channel. |
| defaultChannel | number | 0 | Channel shown first. |
| onChannelChange | (index: number) => void | — | Called on a new channel. |
All <div> props.
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 flight boarding pass with a perforated stub and code that flips to the fare and baggage details.
Stacked cards with the next ones peeking out; Next sends the top card to the back.