Skip to content
العربية
Layout

AspectRatio

Keeps media at a ratio.

import { AspectRatio } from "@percentsa/ui";

Examples

16 : 9
Code
export function AspectRatioExample() {
  return (
    <div className="w-72">
      <AspectRatio ratio={16 / 9}>
        <Box className="size-full">16 : 9</Box>
      </AspectRatio>
    </div>
  );
}