Creates a Container component whose height is always relative to its width
import { AspectRatioContainer } from "mui-extended"; const container = ( <AspectRatioContainer ratio={[16, 9]} width="100%" maxWidth={800}> <Paper sx={{ width: "100%", height: "100%" }} elevation={4} /> </AspectRatioContainer> );
height
& maxHeight
& minHeight
, may break the layout , use it carefullyratio
- array of 2 numbers representing width to height ratioWrite an email to opensource@sodaru.com