Skip to content

Aspect Ratio

Displays content within a desired ratio.

Photo by https://www.pexels.com/tr-tr/@natali-204165532/

Installation

npm i @huin-core/react-aspect-ratio

API Reference

AspectRatio

PropTypeDescription
asChildbooleanWhen set to true, renders the component as its child element, inheriting the child's styles and behavior.
rationumberThe desired ratio