Skip to content
VenusUI
Get started

Retro TV

A wood-cased CRT set: turn the channel knob through static, or switch it off to a closing line.

Preview

Installation

npx shadcn@latest add @venusui/retro-tv

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/retro-tv.tsx

Usage

The 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} />
}

API reference

PropTypeDefaultDescription
channels{ src: string; alt: string; name: string }[]—Pictures for each channel.
defaultChannelnumber0Channel shown first.
onChannelChange(index: number) => void—Called on a new channel.

All <div> props.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Use it to show a portfolio, product shots or a gallery.

Accessibility

  • The knob is a slider (arrow keys) and Power is a switch; the channel is announced.

Troubleshooting

Something looks different from the preview.
Components use your project’s theme tokens, so surrounding colours and radius follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.

Loading preview

Stacked cards with the next ones peeking out; Next sends the top card to the back.