{"name":"phone-frame","entry":"component","title":"PhoneFrame","description":"Phone silhouette with a thick ink edge and speaker slot that stacks your content at the bottom of its screen.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/phone-frame","installName":"phone-frame","page":"https://jbm-ui.bns.studio/c/phone-frame","registryItem":"https://jbm-ui.bns.studio/r/phone-frame.json","sourcePath":"registry/jbm/ui/phone-frame.tsx","files":[{"source":"registry/jbm/ui/phone-frame.tsx","target":"src/jbm/ui/phone-frame.tsx","import":"@/jbm/ui/phone-frame","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/phone-frame.md","json":"https://jbm-ui.bns.studio/catalog/phone-frame.json"},"snippet":"import { PhoneFrame } from \"@/jbm/ui/phone-frame\"\nimport { UiCard } from \"@/jbm/ui/ui-card\" // install @jbm/ui-card separately\nimport { UiButton } from \"@/jbm/ui/ui-button\" // install @jbm/ui-button separately\n\n<PhoneFrame w={200} h={360} gap={14} rotate={-2}>\n  <UiCard w={130} h={100} />\n  <UiButton w={130} h={40} />\n</PhoneFrame>","api":[{"export":"PhoneFrame","kind":"component","summary":"Card-stock phone with an ink edge (1.6% of w, at least 5px), corner radius 13% of w, the paper shadow, and a speaker slot near the top. Children lay out as a centred column pushed to the bottom of the screen (justify flex-end). Content is not clipped or scaled to fit.","props":[{"name":"w","type":"number","required":false,"default":"420","description":"Width in stage pixels, including the edge; sets edge thickness, radius, padding (10% of w, plus 8% extra on top), and the speaker slot."},{"name":"h","type":"number","required":false,"default":"780","description":"Height in stage pixels, including the edge."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Tilt in degrees; applied as a CSS rotate, so the layout box stays w × h."},{"name":"children","type":"React.ReactNode","required":false,"default":null,"description":"Screen content, stacked as a column from the bottom up."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; can override padding, alignment, or transform."},{"name":"gap","type":"number","required":false,"default":"26","description":"Space between children in stage pixels."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":420,"height":780},"vertical":{"width":420,"height":780},"basis":"Fixed w × h box (border-box) at the defaults 420 × 780. `w` and `h` set it directly; `rotate` tilts it visually without changing the layout box, and the shadow extends below."},"examples":[{"title":"Phone holding interface pieces","code":"import { PhoneFrame } from \"@/jbm/ui/phone-frame\"\nimport { UiCard } from \"@/jbm/ui/ui-card\" // install @jbm/ui-card separately\nimport { UiButton } from \"@/jbm/ui/ui-button\" // install @jbm/ui-button separately\n\n<PhoneFrame w={200} h={360} gap={14} rotate={-2}>\n  <UiCard w={130} h={100} />\n  <UiButton w={130} h={40} />\n</PhoneFrame>"}],"qa":["Fill the screen with children taller than the inner area: they overflow the top edge (nothing clips), so size content to h minus the padding.","Check small w: the edge floors at 5px and the speaker slot at 5px tall.","Rotate by a few degrees and confirm corners and shadow stay inside the composition's safe area."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"},{"name":"ui-card","relation":"example-import"},{"name":"ui-button","relation":"example-import"}],"family":"Interface bits","setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}