{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "icon-list",
  "title": "Icon List",
  "description": "A list with an icon on every line for features, benefits and what's included: checks that draw themselves in as the rows fade up, dimmed and struck-through lines for what isn't included, optional descriptions, and one or two columns.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/icon-list/icon-list.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport type IconListIcon = \"check\" | \"x\" | \"arrow\" | \"dot\" | \"plus\";\nexport type IconListSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface IconListItem {\n  text: string;\n  description?: string;\n  /** One of the built-in icons, or your own node. Defaults to the list's icon. */\n  icon?: IconListIcon | React.ReactNode;\n  /** Dim it (and strike it through), e.g. a feature a plan doesn't include. */\n  muted?: boolean;\n}\n\nexport interface IconListProps {\n  items?: IconListItem[];\n  /** Default icon for items without their own. */\n  icon?: IconListIcon;\n  /** plain: icon on its own. badge: icon inside a soft circle. */\n  variant?: \"plain\" | \"badge\";\n  columns?: 1 | 2;\n  /** Rows fade up one after another the first time the list scrolls into view. */\n  animateIn?: boolean;\n  /** Colour for icons of items that aren't muted. Defaults to the text colour. */\n  accent?: string;\n  size?: IconListSize;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.55)\", faint: \"rgba(245,244,241,0.32)\", badge: \"rgba(255,255,255,0.08)\", hover: \"rgba(255,255,255,0.035)\" },\n  light: { text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.55)\", faint: \"rgba(10,10,10,0.32)\", badge: \"rgba(10,10,10,0.06)\", hover: \"rgba(10,10,10,0.03)\" },\n};\n\nconst SIZES: Record<IconListSize, { font: number; small: number; icon: number; badge: number; gap: number; row: number }> = {\n  sm: { font: 13.5, small: 12, icon: 14, badge: 22, gap: 10, row: 6 },\n  md: { font: 15, small: 13, icon: 16, badge: 26, gap: 12, row: 8 },\n  lg: { font: 16.5, small: 14, icon: 18, badge: 30, gap: 14, row: 10 },\n};\n\nconst PATHS: Record<IconListIcon, string[]> = {\n  check: [\"m5 12.5 4.5 4.5L19 7.5\"],\n  x: [\"m6.5 6.5 11 11\", \"m17.5 6.5-11 11\"],\n  arrow: [\"M5 12h14\", \"m13 6 6 6-6 6\"],\n  plus: [\"M12 5.5v13\", \"M5.5 12h13\"],\n  dot: [],\n};\n\nconst DEFAULT_ITEMS: IconListItem[] = [\n  { text: \"Unlimited projects\", description: \"Create as many as you need, no archiving.\" },\n  { text: \"Custom domains with SSL\" },\n  { text: \"Team roles and permissions\" },\n  { text: \"Priority email support\", description: \"Replies within 4 hours on weekdays.\" },\n  { text: \"Version history for 90 days\" },\n  { text: \"Single sign-on (SAML)\", icon: \"x\", muted: true },\n  { text: \"Dedicated success manager\", icon: \"x\", muted: true },\n];\n\nfunction Glyph({ name, size, draw, delay, reduce }: { name: IconListIcon; size: number; draw: boolean; delay: number; reduce: boolean }) {\n  if (name === \"dot\") {\n    return (\n      <svg width={size} height={size} viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n        <circle cx=\"12\" cy=\"12\" r=\"3.5\" fill=\"currentColor\" />\n      </svg>\n    );\n  }\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      {PATHS[name].map((d, i) => (\n        <motion.path key={d} d={d} initial={draw && !reduce ? { pathLength: 0 } : false} animate={{ pathLength: 1 }} transition={{ duration: 0.35, delay: delay + i * 0.08, ease: \"easeOut\" }} />\n      ))}\n    </svg>\n  );\n}\n\nexport function IconList({ items = DEFAULT_ITEMS, icon = \"check\", variant = \"badge\", columns = 1, animateIn = true, accent, size = \"md\", theme = \"dark\", className }: IconListProps) {\n  const p = PALETTES[theme];\n  const s = SIZES[size];\n  const reduce = Boolean(useReducedMotion());\n  const ref = React.useRef<HTMLUListElement>(null);\n  const [seen, setSeen] = React.useState(!animateIn);\n\n  React.useEffect(() => {\n    if (seen || !ref.current) return;\n    const io = new IntersectionObserver(\n      (entries) => {\n        if (entries.some((e) => e.isIntersecting)) {\n          setSeen(true);\n          io.disconnect();\n        }\n      },\n      { threshold: 0.2 },\n    );\n    io.observe(ref.current);\n    return () => io.disconnect();\n  }, [seen]);\n\n  const lineH = s.font * 1.5;\n\n  return (\n    <ul ref={ref} className={cn(\"m-0 grid list-none p-0\", columns === 2 ? \"sm:grid-cols-2\" : \"grid-cols-1\", className)} style={{ columnGap: 28, rowGap: 2, fontFamily: \"Inter, sans-serif\" }}>\n      {items.map((item, i) => {\n        const name: IconListIcon | null = typeof item.icon === \"string\" ? (item.icon as IconListIcon) : item.icon ? null : icon;\n        const delay = reduce || !animateIn ? 0 : i * 0.06;\n        const color = item.muted ? p.faint : (accent ?? p.text);\n        return (\n          <motion.li\n            key={`${item.text}-${i}`}\n            className=\"group flex rounded-xl\"\n            style={{ gap: s.gap, padding: `${s.row}px 10px`, margin: \"0 -10px\", alignItems: item.description ? \"flex-start\" : \"center\" }}\n            initial={animateIn && !reduce ? { opacity: 0, y: 8 } : false}\n            animate={seen ? { opacity: 1, y: 0 } : undefined}\n            transition={{ duration: 0.4, delay, ease: [0.22, 1, 0.36, 1] }}\n            whileHover={{ backgroundColor: p.hover }}\n          >\n            <span\n              className=\"flex shrink-0 items-center justify-center transition-transform duration-200 group-hover:scale-110\"\n              style={{\n                color,\n                width: variant === \"badge\" ? s.badge : s.icon,\n                height: variant === \"badge\" ? s.badge : lineH,\n                borderRadius: 999,\n                background: variant === \"badge\" ? (item.muted ? \"transparent\" : p.badge) : \"transparent\",\n                border: variant === \"badge\" && item.muted ? `1px dashed ${p.faint}` : undefined,\n                marginTop: item.description && variant === \"badge\" ? (lineH - s.badge) / 2 : 0,\n              }}\n            >\n              {name ? seen && <Glyph name={name} size={variant === \"badge\" ? s.icon - 2 : s.icon} draw={animateIn} delay={delay + 0.15} reduce={reduce} /> : (item.icon as React.ReactNode)}\n            </span>\n            <span className=\"flex min-w-0 flex-col\" style={{ gap: 2 }}>\n              <span className=\"font-medium\" style={{ fontSize: s.font, lineHeight: `${lineH}px`, color: item.muted ? p.faint : p.text, textDecoration: item.muted ? \"line-through\" : undefined, textDecorationColor: p.faint }}>\n                {item.text}\n                {item.muted && <span className=\"sr-only\"> (not included)</span>}\n              </span>\n              {item.description && (\n                <span style={{ fontSize: s.small, lineHeight: 1.5, color: p.muted }}>{item.description}</span>\n              )}\n            </span>\n          </motion.li>\n        );\n      })}\n    </ul>\n  );\n}\n\nexport default IconList;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}