{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ink/aspect-ratio",
  "title": "Aspect Ratio",
  "description": "Constrains children to a given aspect ratio",
  "dependencies": [
    "ink"
  ],
  "files": [
    {
      "path": "registry/ui/aspect-ratio.tsx",
      "content": "import { Box } from \"ink\";\nimport type { BoxProps } from \"ink\";\nimport type { ReactNode } from \"react\";\n\nexport interface AspectRatioProps extends Omit<\n  BoxProps,\n  \"children\" | \"height\" | \"width\"\n> {\n  children: ReactNode;\n  ratio?: number;\n  width?: number;\n}\n\nexport const AspectRatio = ({\n  children,\n  ratio = 16 / 9,\n  width = 80,\n  ...props\n}: AspectRatioProps) => {\n  const height = Math.round(width / ratio / 2);\n\n  return (\n    <Box {...props} width={width} height={height} overflow=\"hidden\">\n      {children}\n    </Box>\n  );\n};\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "layout"
  ],
  "type": "registry:ui"
}