Dev Design Library

Aspect Ratio

A container that locks its content to a fixed width/height ratio (a preset like video or square, or a custom number), auto-fitting a single image or video child.

Aspect Ratio preview
Library
ReactFrame
Framework
React
Type
component
License
MIT
Dependencies
clsx, tailwind-merge
Install
npx shadcn@latest add https://reactframe.com/r/aspect-ratio.json
Files
  • registry/new-york/aspect-ratio/aspect-ratio.tsx
Source
https://github.com/AhmetLoca/reactframe-public

Categories

More from ReactFrame