ScalableRect
Deprecated
The ScalableRect component has been deprecated and removed from the library in its v1.31.0 release. Use aspect-ratio CSS property instead.
Original Documentation
Valid for dr.pogodin/react-utils versions prior to v1.31.0
import { ScalableRect } from '@dr.pogodin/react-utils';
The ScalableRect component implements a content container that keeps given aspect ratio while it width scales to fill all available space.
Properties
children
- React.Node - Component children, if any, are rendered as the component's content.className
- string - CSS class(es) to apply to the container.ratio
- string - Aspect ratio of the rendered container, inW:H
format. Defaults to1:1
.