Dev Design Library

Aspect Ratio

Keeps a media container at a chosen width-to-height ratio as its available width changes.

Aspect Ratio preview
Library
Cojeev UI
Framework
React
Type
ui
License
MIT
Dependencies
class-variance-authority
Install
npx shadcn@latest add https://cojeev.com/ui/r/aspect-ratio.json
Files
  • registry/cojeev/ui/aspect-ratio.tsx
  • registry/cojeev/styles/aspect-ratio.css
  • registry/cojeev/lib/utils.ts
  • registry/cojeev/lib/appearance-tokens.ts
  • registry/cojeev/lib/assembly-geometry.ts
  • registry/cojeev/lib/bento-layout.ts
  • registry/cojeev/lib/bloom-engine.ts
  • registry/cojeev/lib/chart-geometry.ts
Source
https://github.com/luv-jeri/cojeev-ui

Categories

More from Cojeev UI