Join our Discord Community
Aspect Ratio/Standard

React 16:9 Aspect Ratio (Widescreen)

A 16:9 widescreen aspect ratio container for video players, hero images, and modern multimedia content

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Widescreen is everywhere now. This React component wraps content in a 16:9 aspect ratio using shadcn/ui's AspectRatio built on Radix UI primitives. The ratio prop (16 / 9) maintains perfect widescreen proportions regardless of container width, preventing layout shift when images or videos load. Perfect for YouTube embeds, video players, hero banners, or any multimedia content matching modern display standards—keeps aspect locked while parent width flexes responsively.

Loading preview...

Pattern created by @haydenbleasel

Installation

npx shadcn@latest add https://www.shadcn.io/registry/aspect-ratio-standard-1.json
npx shadcn@latest add https://www.shadcn.io/registry/aspect-ratio-standard-1.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/aspect-ratio-standard-1.json
bunx shadcn@latest add https://www.shadcn.io/registry/aspect-ratio-standard-1.json

Questions you might have