{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "phone-mockup-card", "type": "registry:ui", "title": "Phone Mockup Card", "description": "A minimal phone frame card with pixel-perfect status bar, dynamic island, and typography metrics display.", "dependencies": [ "motion", "react-icons" ], "files": [ { "path": "registry/ruixenui/phone-mockup-card.tsx", "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion } from \"motion/react\";\nimport { IoCellular, IoWifi, IoBatteryFull } from \"react-icons/io5\";\n\ninterface PhoneMockupCardProps {\n title?: string;\n bodyText?: string;\n highlight?: string;\n secondaryText?: string;\n metrics?: { label: string; value: string }[];\n className?: string;\n}\n\nconst ease = [0.2, 0.8, 0.2, 1];\n\nconst stagger = {\n hidden: {},\n show: { transition: { staggerChildren: 0.08, delayChildren: 0.25 } },\n};\n\nconst item = {\n hidden: { opacity: 0, y: 8, filter: \"blur(4px)\" },\n show: {\n opacity: 1,\n y: 0,\n filter: \"blur(0px)\",\n transition: { duration: 0.5, ease },\n },\n};\n\nexport default function PhoneMockupCard({\n title = \"Craft\",\n bodyText = \"Interfaces shaped by spatial intention — where every surface, shadow, and transition exists with purpose.\",\n highlight = \"spatial intention\",\n secondaryText = \"Typography that breathes. Motion that guides. Surfaces that know the light.\",\n metrics = [\n { label: \"Tracking\", value: \"–0.02\" },\n { label: \"Leading\", value: \"1.65\" },\n { label: \"Weight\", value: \"420\" },\n ],\n className,\n}: PhoneMockupCardProps) {\n const renderBody = () => {\n if (!highlight || !bodyText.includes(highlight)) return
{bodyText}
;\n const i = bodyText.indexOf(highlight);\n return (\n\n {bodyText.slice(0, i)}\n \n {highlight}\n \n {bodyText.slice(i + highlight.length)}\n
\n );\n };\n\n return (\n\n {secondaryText}\n
\n\n {m.value}\n
\n\n {m.label}\n
\n