{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "phone-frame",
  "title": "PhoneFrame",
  "description": "A phone drawn around content, to show a component at phone size.",
  "registryDependencies": [
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "phone-frame/PhoneFrame.css",
      "content": ".cr-phone-frame {\n  display: grid;\n  gap: var(--cr-space-3);\n  justify-items: center;\n  margin: 0;\n  font-family: var(--cr-font-family-sans);\n}\n\n/* The hardware stays near-black in both themes. */\n.cr-phone-frame__body {\n  box-sizing: border-box;\n  width: 100%;\n  aspect-ratio: 9 / 18.5;\n  padding: 10px;\n  border-radius: 44px;\n  background: var(--cr-gray-950);\n  /* A faint edge keeps the black body visible on dark pages. */\n  box-shadow: var(--cr-shadow-md), 0 0 0 1px var(--cr-color-border-strong);\n}\n\n.cr-phone-frame__screen {\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  height: 100%;\n  padding: 44px var(--cr-space-4) var(--cr-space-4);\n  overflow: hidden;\n  border-radius: 34px;\n  background: var(--cr-color-bg-canvas);\n  color: var(--cr-color-text-default);\n}\n\n.cr-phone-frame__island {\n  position: absolute;\n  top: 10px;\n  left: 50%;\n  width: 72px;\n  height: 20px;\n  border-radius: var(--cr-radius-full);\n  background: var(--cr-gray-950);\n  transform: translateX(-50%);\n}\n\n.cr-phone-frame__caption {\n  color: var(--cr-color-text-muted);\n  font-size: var(--cr-font-size-xs);\n  font-weight: var(--cr-font-weight-semibold);\n}\n",
      "type": "registry:file",
      "target": "@components/creance/phone-frame/PhoneFrame.css"
    },
    {
      "path": "phone-frame/PhoneFrame.tsx",
      "content": "import { useId, type ReactNode } from 'react';\nimport { cx } from '@/lib/creance/cx';\nimport './PhoneFrame.css';\n\nexport interface PhoneFrameProps {\n  children: ReactNode;\n  caption?: ReactNode;\n  /** Screen width in CSS pixels. Default 220. */\n  width?: number;\n  className?: string;\n}\n\n/** A phone drawn around content, to show a component at phone size. */\nexport function PhoneFrame({ children, caption, width = 220, className }: PhoneFrameProps) {\n  const captionId = useId();\n  return (\n    <figure aria-labelledby={caption ? captionId : undefined} className={cx('cr-phone-frame', className)} style={{ width }}>\n      <div className=\"cr-phone-frame__body\">\n        <div className=\"cr-phone-frame__screen\">\n          <span className=\"cr-phone-frame__island\" aria-hidden=\"true\" />\n          {children}\n        </div>\n      </div>\n      {caption && <figcaption id={captionId} className=\"cr-phone-frame__caption\">{caption}</figcaption>}\n    </figure>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/phone-frame/PhoneFrame.tsx"
    }
  ],
  "categories": [
    "molecule",
    "media"
  ],
  "type": "registry:ui"
}