Skip to content

shadcn.io is an independent project built on shadcn/ui

TV Product Card Block for Radix UI

A TV range drawn against a sofa at true proportion, with a size group, a seat-to-screen slider, a distance scale and a typed verdict on whether the size suits the room.

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Help shoppers choose a size for their room with this TV product card for React with Radix UI. A living room wall is drawn full width with a two-seat sofa for scale, and the TV above it is redrawn to true proportion as you pick 50, 55, 65, 75 or 85 inch in a Toggle Group or move a Slider for the seat-to-screen distance from 1.5 to 4.5 m. A distance scale shades the comfortable range, 1.2 to 1.9 times the diagonal, and marks where you sit, and a sentence says whether you are in range, too close or a little far. An outline Button turns into "Added" with an Undo and the "Bag" count follows. Guides rule the bands. For TVs, projectors and any product that has to fit a space.

FAQ

How do I change the sizes?

Edit SIZES (diagonal in inches and price in cents). The screen width, the comfortable range and the verdict are worked out from the diagonal.

What is the rule behind the verdict?

A typed rule: the comfortable distance is 1.2 to 1.9 times the diagonal. It is a guide for this demo, not a measurement of anyone's room.

Is the TV really to scale?

Yes, against the sofa: the sofa is 2.1 m wide and the screen width is worked out for 16:9 from the diagonal in the same units.

What stays local, and how do I wire it for real?

The size, the distance and the bag are page state; nothing is stored, charged or sent. Replace add and undo with calls to your cart and send the size.

How does it look on a phone?

The room scales down with the page, the size group wraps if it needs to, and the slider and scale fill the width.

Is it accessible?

The sizes are a named group of toggle buttons and the slider has a name and a spoken value in metres. The room is a labelled image, and the verdict is announced by the polite status line when you stop moving the slider.