Rad UI is under active development and looking for contributors to shape the future of the library. If you'd like to contribute to Rad UI, please check out Getting Started

Aspect Ratio is used to set the desired ratio.

Landscape photograph
import 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>
)
PropTypeDefaultDescription
ratiostring1Used to set desired ratio