{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "aspect-ratio",
  "title": "Aspect ratio",
  "description": "A box that keeps its width to height, for an image, a video or a map. A new ratio glides into place, and a class can change it at a breakpoint.",
  "dependencies": [
    "@ui-sdk/react",
    "@ui-sdk/core"
  ],
  "registryDependencies": [
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/aspect-ratio.tsx",
      "content": "'use client'\n\nimport { mergeProps, type PartProps, renderElement } from '@ui-sdk/react/primitive'\nimport type { CSSProperties } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * A box that keeps its width to height, for an image, a video or a map. Its\n * ratio is the `--ratio` variable, so a class can change it at a breakpoint,\n * and a new ratio glides on `layout`, pushing what sits below it along.\n */\n\nfunction AspectRatio({\n  ratio,\n  className,\n  style,\n  render,\n  ...props\n}: Omit<PartProps<'div'>, 'className' | 'style'> & {\n  className?: string\n  style?: CSSProperties\n  /** Width over height, such as `16 / 9`. Without it, the `--ratio` variable's value, or 1. */\n  ratio?: number\n}) {\n  return renderElement(\n    'div',\n    mergeProps(\n      {\n        'data-slot': 'aspect-ratio',\n        className: cn(\n          // `min-h-0` and `shrink-0` keep the ratio when content is taller than the box or a\n          // flex column is shorter than it, so a child sized `size-full` fills it. `--ratio` is\n          // set here so the box never takes it from an AspectRatio around it.\n          'relative min-h-0 shrink-0 [--ratio:1] aspect-(--ratio)',\n          'transition-[aspect-ratio] duration-(--motion-layout-duration) ease-(--motion-layout-easing) motion-reduce:transition-none',\n          className,\n        ),\n        style: { '--ratio': ratio, ...style } as CSSProperties,\n      },\n      props,\n    ),\n    render,\n  )\n}\n\nexport { AspectRatio }\n",
      "type": "registry:component",
      "target": "@components/kino/aspect-ratio.tsx"
    }
  ],
  "type": "registry:component"
}