Aspect Ratio is used to set the desired ratio.
import AspectRatio from "@radui/ui/AspectRatio"| Prop | Type | Default | Description |
|---|---|---|---|
ratio | string | number | 1 | Used to set desired ratio |
Aspect Ratio is used to set the desired ratio.
import AspectRatio from "@radui/ui/AspectRatio"
React1 2 3 4 5 6 7 8 9 10 11 12import AspectRatio from "@radui/ui/AspectRatio" const AspectRatioExample = () => ( <AspectRatio ratio='16/9'> <img style={{ width: '100%', height: '100%', objectFit: 'cover' }} className="Image" src="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg?cs=srgb&dl=pexels-bri-schneiter-28802-346529.jpg&fm=jpg" alt="Landscape photograph" /> </AspectRatio> )
| Prop | Type | Default | Description |
|---|---|---|---|
ratio | string | number | 1 | Used to set desired ratio |