{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"feature-bento","type":"registry:block","title":"Feature bento","description":"A five-tile bento grid where each tile runs a small live illustration: a drawing sparkline, a ticking counter, a toggle, a progress ring, and a typing command line.","dependencies":["motion","lucide-react"],"registryDependencies":["utils"],"files":[{"path":"registry/prequel/feature-bento/feature-bento.tsx","type":"registry:component","content":"\"use client\";\n\nimport {\n  useEffect,\n  useId,\n  useRef,\n  useState,\n  type ReactNode,\n} from \"react\";\nimport {\n  MotionConfig,\n  animate,\n  motion,\n  useInView,\n  useReducedMotion,\n} from \"motion/react\";\nimport { ArrowDownRight, ArrowUpRight, Check } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nconst EASE: [number, number, number, number] = [0.22, 1, 0.36, 1];\n\nexport type FeatureBentoRevenue = {\n  label: string;\n  value: number;\n  prefix?: string;\n  suffix?: string;\n  decimals?: number;\n  delta: number;\n  deltaLabel?: string;\n  series: number[];\n  tone?: number;\n};\n\nexport type FeatureBentoCounter = {\n  label: string;\n  value: number;\n  prefix?: string;\n  suffix?: string;\n  delta: number;\n  deltaLabel?: string;\n};\n\nexport type FeatureBentoStorage = {\n  label: string;\n  used: number;\n  total: number;\n  unit?: string;\n  tone?: number;\n};\n\nexport type FeatureBentoAutomation = {\n  label: string;\n  description: string;\n  detail: string;\n  defaultOn?: boolean;\n};\n\nexport type FeatureBentoCommand = {\n  label: string;\n  command: string;\n  response: string;\n};\n\nexport type FeatureBentoProps = {\n  className?: string;\n  eyebrow?: string;\n  title?: string;\n  description?: string;\n  revenue?: FeatureBentoRevenue;\n  workspaces?: FeatureBentoCounter;\n  automation?: FeatureBentoAutomation;\n  storage?: FeatureBentoStorage;\n  command?: FeatureBentoCommand;\n};\n\nconst DEFAULT_REVENUE: FeatureBentoRevenue = {\n  label: \"Recurring revenue\",\n  value: 84260,\n  prefix: \"$\",\n  decimals: 0,\n  delta: 12.4,\n  deltaLabel: \"vs last month\",\n  series: [41, 44, 43, 47, 51, 50, 54, 58, 61, 66, 72, 78, 84],\n  tone: 1,\n};\n\nconst DEFAULT_WORKSPACES: FeatureBentoCounter = {\n  label: \"Active workspaces\",\n  value: 1284,\n  delta: 8.2,\n  deltaLabel: \"vs last month\",\n};\n\nconst DEFAULT_STORAGE: FeatureBentoStorage = {\n  label: \"Storage used\",\n  used: 34.2,\n  total: 50,\n  unit: \"GB\",\n  tone: 2,\n};\n\nconst DEFAULT_AUTOMATION: FeatureBentoAutomation = {\n  label: \"Automatic backups\",\n  description: \"Snapshots every 6 hours\",\n  detail: \"Last backup 12 min ago\",\n  defaultOn: true,\n};\n\nconst DEFAULT_COMMAND: FeatureBentoCommand = {\n  label: \"Quick actions\",\n  command: \"npx shadcn@latest add feature-bento\",\n  response: \"Added feature-bento\",\n};\n\nconst TILE =\n  \"group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-background/50 p-4 text-card-foreground transition-[transform,border-color,box-shadow] duration-300 ease-out hover:-translate-y-0.5 hover:border-muted-foreground/30 hover:shadow-[0_24px_60px_-42px_var(--foreground)] sm:p-5 motion-reduce:transition-none motion-reduce:hover:translate-y-0\";\n\nfunction clamp(value: number, min: number, max: number) {\n  return Math.min(max, Math.max(min, value));\n}\n\nfunction formatMetric(\n  value: number,\n  decimals = 0,\n  prefix = \"\",\n  suffix = \"\"\n) {\n  const number = value.toLocaleString(\"en-US\", {\n    minimumFractionDigits: decimals,\n    maximumFractionDigits: decimals,\n  });\n  return `${prefix}${number}${suffix}`;\n}\n\nfunction useCountUp(\n  target: number,\n  opts: { start: boolean; reduce: boolean; delay: number }\n) {\n  const [value, setValue] = useState(0);\n  const started = useRef(false);\n\n  useEffect(() => {\n    if (!opts.start) return;\n    if (opts.reduce) {\n      setValue(target);\n      return;\n    }\n    if (started.current) return;\n    started.current = true;\n\n    const controls = animate(0, target, {\n      duration: 1.05,\n      ease: EASE,\n      delay: opts.delay,\n      onUpdate: (v) => setValue(v),\n      onComplete: () => setValue(target),\n    });\n\n    return () => controls.stop();\n  }, [opts.start, target, opts.reduce, opts.delay]);\n\n  return value;\n}\n\nfunction useTypewriter(\n  text: string,\n  opts: { start: boolean; reduce: boolean; delay: number }\n) {\n  const [count, setCount] = useState(0);\n\n  useEffect(() => {\n    if (!opts.start) return;\n    if (opts.reduce) {\n      setCount(text.length);\n      return;\n    }\n\n    setCount(0);\n    let index = 0;\n    let timer: ReturnType<typeof setTimeout> | undefined;\n\n    const tick = () => {\n      index += 1;\n      setCount(index);\n      if (index < text.length) {\n        timer = setTimeout(tick, 42);\n      }\n    };\n\n    const startTimer = setTimeout(tick, opts.delay * 1000);\n\n    return () => {\n      clearTimeout(startTimer);\n      if (timer) clearTimeout(timer);\n    };\n  }, [text, opts.start, opts.reduce, opts.delay]);\n\n  return text.slice(0, count);\n}\n\ntype DeltaBadgeProps = {\n  delta: number;\n  label?: string;\n  className?: string;\n};\n\nfunction DeltaBadge({ delta, label, className }: DeltaBadgeProps) {\n  const positive = delta > 0;\n  const neutral = delta === 0;\n\n  return (\n    <div className={cn(\"flex shrink-0 flex-col items-end gap-1\", className)}>\n      <span\n        className={cn(\n          \"inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[11px] font-medium tabular-nums\",\n          neutral\n            ? \"bg-muted text-muted-foreground\"\n            : positive\n              ? \"bg-success/10 text-success\"\n              : \"bg-destructive/10 text-destructive\"\n        )}\n      >\n        {neutral ? null : positive ? (\n          <ArrowUpRight className=\"h-3 w-3\" aria-hidden=\"true\" />\n        ) : (\n          <ArrowDownRight className=\"h-3 w-3\" aria-hidden=\"true\" />\n        )}\n        {`${positive ? \"+\" : delta < 0 ? \"−\" : \"\"}${Math.abs(delta).toFixed(1)}%`}\n      </span>\n      {label ? (\n        <span className=\"text-[11px] text-muted-foreground\">{label}</span>\n      ) : null}\n    </div>\n  );\n}\n\ntype TileProps = {\n  children: ReactNode;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n  className?: string;\n  onHoverChange?: (hovered: boolean) => void;\n};\n\nfunction Tile({\n  children,\n  index,\n  show,\n  reduce,\n  className,\n  onHoverChange,\n}: TileProps) {\n  return (\n    <motion.div\n      initial={{ opacity: 0, y: reduce ? 0 : 14 }}\n      animate={{ opacity: show ? 1 : 0, y: 0 }}\n      transition={{\n        duration: reduce ? 0 : 0.55,\n        delay: reduce ? 0 : index * 0.06,\n        ease: EASE,\n      }}\n      className={cn(\"min-w-0\", className)}\n    >\n      <div\n        onPointerEnter={() => onHoverChange?.(true)}\n        onPointerLeave={() => onHoverChange?.(false)}\n        className={cn(TILE, \"h-full\")}\n      >\n        {children}\n      </div>\n    </motion.div>\n  );\n}\n\nconst SPARK_W = 320;\nconst SPARK_H = 100;\nconst SPARK_PAD = 8;\n\ntype Pt = { x: number; y: number };\n\nfunction sparkPoints(values: number[]): Pt[] {\n  const n = values.length;\n  const min = Math.min(...values);\n  const max = Math.max(...values);\n  const range = max - min || 1;\n\n  return values.map((value, index) => ({\n    x:\n      SPARK_PAD +\n      ((SPARK_W - SPARK_PAD * 2) * index) / Math.max(1, n - 1),\n    y:\n      SPARK_H -\n      SPARK_PAD -\n      ((value - min) / range) * (SPARK_H - SPARK_PAD * 2),\n  }));\n}\n\nfunction sparkPath(points: Pt[]) {\n  return points\n    .map((point, index) => {\n      if (index === 0) return `M${point.x},${point.y}`;\n      const previous = points[index - 1];\n      const cx = (previous.x + point.x) / 2;\n      return `C${cx},${previous.y} ${cx},${point.y} ${point.x},${point.y}`;\n    })\n    .join(\" \");\n}\n\ntype RevenueTileProps = {\n  revenue: FeatureBentoRevenue;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n};\n\nfunction RevenueTile({ revenue, index, show, reduce }: RevenueTileProps) {\n  const value = useCountUp(revenue.value, {\n    start: show,\n    reduce,\n    delay: 0.15,\n  });\n  const color = `var(--chart-${clamp(revenue.tone ?? 1, 1, 5)})`;\n  const series = revenue.series.length > 1 ? revenue.series : [0, 1];\n  const points = sparkPoints(series);\n  const line = sparkPath(points);\n  const last = points[points.length - 1];\n  const first = points[0];\n  const area = `${line} L${last.x},${SPARK_H} L${first.x},${SPARK_H} Z`;\n\n  return (\n    <Tile\n      index={index}\n      show={show}\n      reduce={reduce}\n      className=\"sm:col-span-2 lg:col-span-4 lg:row-span-2\"\n    >\n      <div className=\"flex flex-wrap items-start justify-between gap-3\">\n        <div className=\"min-w-0\">\n          <p className=\"text-[12px] font-medium text-muted-foreground\">\n            {revenue.label}\n          </p>\n          <p className=\"mt-1 text-[28px] font-semibold leading-none tracking-tight tabular-nums sm:text-[36px]\">\n            {formatMetric(\n              value,\n              revenue.decimals ?? 0,\n              revenue.prefix,\n              revenue.suffix\n            )}\n          </p>\n        </div>\n        <DeltaBadge delta={revenue.delta} label={revenue.deltaLabel} />\n      </div>\n\n      <div className=\"mt-4 min-h-0 flex-1\">\n        <svg\n          viewBox={`0 0 ${SPARK_W} ${SPARK_H}`}\n          className=\"block h-auto w-full\"\n          role=\"img\"\n          aria-label={`${revenue.label} over the last ${series.length} weeks, trending ${\n            revenue.delta >= 0 ? \"up\" : \"down\"\n          }.`}\n        >\n          {[0.25, 0.5, 0.75].map((fraction) => (\n            <line\n              key={fraction}\n              x1={SPARK_PAD}\n              x2={SPARK_W - SPARK_PAD}\n              y1={SPARK_PAD + (SPARK_H - SPARK_PAD * 2) * fraction}\n              y2={SPARK_PAD + (SPARK_H - SPARK_PAD * 2) * fraction}\n              stroke=\"var(--border)\"\n              strokeWidth={1}\n              strokeDasharray=\"2 5\"\n            />\n          ))}\n\n          <motion.path\n            d={area}\n            fill={color}\n            initial={{ opacity: reduce ? 0.08 : 0 }}\n            animate={{ opacity: show ? 0.08 : 0 }}\n            transition={\n              reduce\n                ? { duration: 0 }\n                : { duration: 0.8, delay: 0.35, ease: EASE }\n            }\n          />\n\n          <motion.path\n            d={line}\n            fill=\"none\"\n            stroke={color}\n            strokeWidth={1.75}\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            initial={{ pathLength: reduce ? 1 : 0 }}\n            animate={{ pathLength: show ? 1 : 0 }}\n            transition={\n              reduce\n                ? { duration: 0 }\n                : { duration: 1.2, delay: 0.1, ease: EASE }\n            }\n          />\n\n          <motion.circle\n            cx={last.x}\n            cy={last.y}\n            r={3}\n            fill=\"var(--card)\"\n            stroke={color}\n            strokeWidth={1.75}\n            initial={{ opacity: reduce ? 1 : 0, scale: reduce ? 1 : 0.6 }}\n            animate={{ opacity: show ? 1 : 0, scale: 1 }}\n            transition={\n              reduce\n                ? { duration: 0 }\n                : { duration: 0.4, delay: 0.85, ease: EASE }\n            }\n            style={{ transformOrigin: `${last.x}px ${last.y}px` }}\n          />\n        </svg>\n      </div>\n\n      <div className=\"mt-2 flex items-center justify-between text-[11px] text-muted-foreground\">\n        <span>12 weeks ago</span>\n        <span>This week</span>\n      </div>\n    </Tile>\n  );\n}\n\ntype CounterTileProps = {\n  counter: FeatureBentoCounter;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n};\n\nfunction CounterTile({ counter, index, show, reduce }: CounterTileProps) {\n  const value = useCountUp(counter.value, {\n    start: show,\n    reduce,\n    delay: 0.2,\n  });\n\n  return (\n    <Tile index={index} show={show} reduce={reduce} className=\"lg:col-span-2\">\n      <p className=\"text-[12px] font-medium text-muted-foreground\">\n        {counter.label}\n      </p>\n      <p className=\"mt-1 text-[26px] font-semibold leading-none tracking-tight tabular-nums\">\n        {formatMetric(value, 0, counter.prefix, counter.suffix)}\n      </p>\n      <div className=\"mt-auto flex flex-wrap items-center gap-2 pt-3\">\n        <DeltaBadge delta={counter.delta} />\n        {counter.deltaLabel ? (\n          <span className=\"text-[11px] text-muted-foreground\">\n            {counter.deltaLabel}\n          </span>\n        ) : null}\n      </div>\n      <p className=\"mt-1 text-[11px] text-muted-foreground\">\n        Live across every workspace\n      </p>\n    </Tile>\n  );\n}\n\ntype AutomationTileProps = {\n  automation: FeatureBentoAutomation;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n};\n\nfunction AutomationTile({\n  automation,\n  index,\n  show,\n  reduce,\n}: AutomationTileProps) {\n  const [on, setOn] = useState(automation.defaultOn ?? true);\n\n  return (\n    <Tile index={index} show={show} reduce={reduce} className=\"lg:col-span-2\">\n      <div className=\"flex items-start justify-between gap-3\">\n        <div className=\"min-w-0\">\n          <p className=\"text-[12px] font-medium text-muted-foreground\">\n            {automation.label}\n          </p>\n          <p className=\"mt-1 text-[13px] leading-snug text-card-foreground\">\n            {automation.description}\n          </p>\n        </div>\n        <button\n          type=\"button\"\n          role=\"switch\"\n          aria-checked={on}\n          aria-label={`Toggle ${automation.label}`}\n          onClick={() => setOn((current) => !current)}\n          className={cn(\n            \"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border p-0.5 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n            on ? \"border-foreground/20 bg-foreground\" : \"border-border bg-muted\"\n          )}\n        >\n          <motion.span\n            initial={false}\n            animate={{ x: on ? 20 : 0 }}\n            transition={\n              reduce\n                ? { duration: 0 }\n                : { duration: 0.3, ease: EASE }\n            }\n            className={cn(\n              \"block h-5 w-5 rounded-full bg-background shadow-sm\",\n              on ? null : \"border border-border\"\n            )}\n          />\n        </button>\n      </div>\n\n      <div className=\"mt-auto flex items-center gap-2 pt-4 text-[11px] text-muted-foreground\">\n        <motion.span\n          initial={false}\n          animate={{ opacity: on ? 1 : 0.4 }}\n          transition={{ duration: reduce ? 0 : 0.25 }}\n          aria-hidden=\"true\"\n          className={cn(\n            \"h-1.5 w-1.5 shrink-0 rounded-full\",\n            on ? \"bg-success\" : \"bg-muted-foreground\"\n          )}\n        />\n        <span className=\"min-w-0 truncate\">\n          {on ? automation.detail : \"Paused\"}\n        </span>\n      </div>\n    </Tile>\n  );\n}\n\nconst RING_W = 72;\nconst RING_CX = 36;\nconst RING_CY = 36;\nconst RING_R = 28;\nconst RING_STROKE = 6;\nconst RING_CIRCUMFERENCE = 2 * Math.PI * RING_R;\n\nfunction polar(cx: number, cy: number, r: number, degrees: number) {\n  const radians = (degrees * Math.PI) / 180;\n  /* Round before rendering so server and client agree on the last digits. */\n  const round = (n: number) => Math.round(n * 1000) / 1000;\n  return {\n    x: round(cx + r * Math.cos(radians)),\n    y: round(cy + r * Math.sin(radians)),\n  };\n}\n\ntype StorageTileProps = {\n  storage: FeatureBentoStorage;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n};\n\nfunction StorageTile({ storage, index, show, reduce }: StorageTileProps) {\n  const [hovered, setHovered] = useState(false);\n  const total = Math.max(0, storage.total);\n  const used = clamp(storage.used, 0, total || storage.used);\n  const fraction = total > 0 ? clamp(used / total, 0, 1) : 0;\n  const percent = useCountUp(fraction * 100, {\n    start: show,\n    reduce,\n    delay: 0.3,\n  });\n\n  const color = `var(--chart-${clamp(storage.tone ?? 1, 1, 5)})`;\n  const tip = polar(RING_CX, RING_CY, RING_R, -90 + fraction * 360);\n  const offset = RING_CIRCUMFERENCE * (1 - fraction);\n  const usedDecimals = Number.isInteger(storage.used) ? 0 : 1;\n\n  return (\n    <Tile\n      index={index}\n      show={show}\n      reduce={reduce}\n      className=\"sm:col-span-2 lg:col-span-2\"\n      onHoverChange={setHovered}\n    >\n      <div className=\"flex items-start justify-between gap-3\">\n        <div className=\"min-w-0\">\n          <p className=\"text-[12px] font-medium text-muted-foreground\">\n            {storage.label}\n          </p>\n          <p className=\"mt-1 text-[11px] text-muted-foreground\">\n            {`${formatMetric(used, usedDecimals)} of ${formatMetric(total)} ${\n              storage.unit ?? \"\"\n            }`}\n          </p>\n        </div>\n        <span className=\"shrink-0 text-[11px] font-medium tabular-nums text-muted-foreground\">\n          {`${Math.round(fraction * 100)}%`}\n        </span>\n      </div>\n\n      <div className=\"mt-3 flex flex-1 items-center justify-center\">\n        <div\n          role=\"progressbar\"\n          aria-label={storage.label}\n          aria-valuemin={0}\n          aria-valuemax={100}\n          aria-valuenow={Math.round(fraction * 100)}\n          aria-valuetext={`${Math.round(fraction * 100)} percent used`}\n          className=\"relative w-[118px] max-w-full\"\n        >\n          <svg\n            viewBox={`0 0 ${RING_W} ${RING_W}`}\n            className=\"block h-auto w-full\"\n            aria-hidden=\"true\"\n          >\n            <circle\n              cx={RING_CX}\n              cy={RING_CY}\n              r={RING_R}\n              fill=\"none\"\n              stroke=\"var(--muted)\"\n              strokeWidth={RING_STROKE}\n            />\n\n            <motion.circle\n              cx={RING_CX}\n              cy={RING_CY}\n              r={RING_R}\n              fill=\"none\"\n              stroke={color}\n              strokeWidth={RING_STROKE}\n              strokeLinecap=\"round\"\n              strokeDasharray={RING_CIRCUMFERENCE}\n              transform={`rotate(-90 ${RING_CX} ${RING_CY})`}\n              initial={{\n                strokeDashoffset: reduce ? offset : RING_CIRCUMFERENCE,\n              }}\n              animate={{ strokeDashoffset: show ? offset : RING_CIRCUMFERENCE }}\n              transition={\n                reduce\n                  ? { duration: 0 }\n                  : { duration: 1, delay: 0.3, ease: EASE }\n              }\n            />\n\n            <g>\n              <circle\n                cx={tip.x}\n                cy={tip.y}\n                r={5.5}\n                fill=\"var(--card)\"\n                stroke={color}\n                strokeWidth={1.5}\n              />\n              <circle cx={tip.x} cy={tip.y} r={2.2} fill={color} />\n              <motion.g\n                initial={false}\n                animate={{\n                  rotate: hovered ? 40 : -30,\n                  opacity: hovered ? 1 : 0.6,\n                }}\n                transition={{\n                  rotate: {\n                    duration: reduce ? 0 : 0.7,\n                    ease: EASE,\n                  },\n                  opacity: { duration: reduce ? 0 : 0.2 },\n                }}\n                style={{ transformOrigin: `${tip.x}px ${tip.y}px` }}\n              >\n                <circle\n                  cx={tip.x}\n                  cy={tip.y - 4.2}\n                  r={1.15}\n                  fill=\"var(--foreground)\"\n                />\n              </motion.g>\n            </g>\n          </svg>\n\n          <div\n            aria-hidden=\"true\"\n            className=\"pointer-events-none absolute inset-0 flex flex-col items-center justify-center\"\n          >\n            <span className=\"text-[18px] font-semibold leading-none tabular-nums\">\n              {`${Math.round(percent)}%`}\n            </span>\n            <span className=\"mt-1 text-[9px] font-medium uppercase tracking-[0.12em] text-muted-foreground\">\n              used\n            </span>\n          </div>\n        </div>\n      </div>\n    </Tile>\n  );\n}\n\ntype CommandTileProps = {\n  command: FeatureBentoCommand;\n  index: number;\n  show: boolean;\n  reduce: boolean;\n};\n\nfunction CommandTile({ command, index, show, reduce }: CommandTileProps) {\n  const typed = useTypewriter(command.command, {\n    start: show,\n    reduce,\n    delay: 0.55,\n  });\n  const done = typed.length >= command.command.length;\n\n  return (\n    <Tile index={index} show={show} reduce={reduce} className=\"sm:col-span-2 lg:col-span-4\">\n      <div className=\"flex items-start justify-between gap-3\">\n        <p className=\"text-[12px] font-medium text-muted-foreground\">\n          {command.label}\n        </p>\n        <kbd className=\"shrink-0 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground\">\n          ⌘K\n        </kbd>\n      </div>\n\n      <div className=\"mt-3 flex flex-1 flex-col justify-center rounded-md border border-border bg-muted/40 px-3 py-2.5 font-mono text-[11px] sm:text-[12px]\">\n        <div className=\"flex items-center gap-1.5 overflow-hidden whitespace-nowrap\">\n          <span aria-hidden=\"true\" className=\"shrink-0 text-muted-foreground\">\n            $\n          </span>\n          <span aria-hidden=\"true\" className=\"min-w-0 overflow-hidden text-ellipsis text-foreground\">\n            {typed}\n          </span>\n          <motion.span\n            aria-hidden=\"true\"\n            initial={false}\n            animate={{ opacity: done ? 0 : 1 }}\n            transition={{ duration: reduce ? 0 : 0.2 }}\n            className=\"inline-block h-3.5 w-[6px] shrink-0 rounded-[1px] bg-foreground\"\n          />\n          <span className=\"sr-only\">{command.command}</span>\n        </div>\n\n        <div className=\"mt-1.5 min-h-[18px] text-[11px]\">\n          <motion.span\n            initial={false}\n            animate={{\n              opacity: done ? 1 : 0,\n              y: done || reduce ? 0 : 3,\n            }}\n            transition={\n              reduce\n                ? { duration: 0 }\n                : { duration: 0.35, ease: EASE }\n            }\n            className=\"inline-flex items-center gap-1 text-success\"\n          >\n            <Check className=\"h-3 w-3\" aria-hidden=\"true\" />\n            {command.response}\n          </motion.span>\n        </div>\n      </div>\n\n      <p className=\"mt-2 text-[11px] text-muted-foreground\">\n        Type a command to jump anywhere.\n      </p>\n    </Tile>\n  );\n}\n\nexport function FeatureBento({\n  className,\n  eyebrow = \"Overview\",\n  title = \"A calmer control room\",\n  description = \"Live product signals and the controls that keep them moving, arranged in one quiet surface.\",\n  revenue = DEFAULT_REVENUE,\n  workspaces = DEFAULT_WORKSPACES,\n  automation = DEFAULT_AUTOMATION,\n  storage = DEFAULT_STORAGE,\n  command = DEFAULT_COMMAND,\n}: FeatureBentoProps) {\n  const ref = useRef<HTMLElement>(null);\n  const titleId = useId();\n  const inView = useInView(ref, { once: true, margin: \"-10% 0px\" });\n  const reduce = Boolean(useReducedMotion());\n  const show = inView;\n\n  return (\n    <MotionConfig reducedMotion=\"user\">\n      <motion.section\n        ref={ref}\n        aria-labelledby={titleId}\n        initial={{ opacity: 0, y: reduce ? 0 : 20 }}\n        animate={show ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}\n        transition={{ duration: reduce ? 0 : 0.6, ease: EASE }}\n        className={cn(\n          \"rounded-xl border border-border bg-card p-4 text-card-foreground shadow-sm sm:p-6\",\n          className\n        )}\n      >\n        <div className=\"mb-4 flex flex-col gap-1 sm:mb-5\">\n          <span className=\"text-[10px] font-medium uppercase tracking-[0.16em] text-muted-foreground\">\n            {eyebrow}\n          </span>\n          <h2\n            id={titleId}\n            className=\"text-[20px] font-semibold tracking-tight sm:text-[22px]\"\n          >\n            {title}\n          </h2>\n          {description ? (\n            <p className=\"max-w-xl text-[13px] leading-relaxed text-muted-foreground\">\n              {description}\n            </p>\n          ) : null}\n        </div>\n\n        <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-6 lg:auto-rows-[minmax(160px,auto)]\">\n          <RevenueTile\n            revenue={revenue}\n            index={0}\n            show={show}\n            reduce={reduce}\n          />\n          <CounterTile\n            counter={workspaces}\n            index={1}\n            show={show}\n            reduce={reduce}\n          />\n          <AutomationTile\n            automation={automation}\n            index={2}\n            show={show}\n            reduce={reduce}\n          />\n          <StorageTile\n            storage={storage}\n            index={3}\n            show={show}\n            reduce={reduce}\n          />\n          <CommandTile\n            command={command}\n            index={4}\n            show={show}\n            reduce={reduce}\n          />\n        </div>\n      </motion.section>\n    </MotionConfig>\n  );\n}\n\nexport default FeatureBento;\n"}]}