Layout
Aspect Ratio

Aspect Ratio

Displays content within a desired ratio.

16/4

Anatomy

import { AspectRatio } from "@lualtek/react-components";
 
export default () => {
  return <AspectRatio ratio="16/9">...</AspectRatio>;
};

API Reference

export type AspectRatioProps = {
  /**
   * Set the aspect ratio string to apply to the children.
   * The string format is `width / height`.
   * @example '16 / 9'
   */
  ratio: string;
};