{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "character-count",
  "type": "registry:ui",
  "title": "Character count",
  "description": "Live React character counter that shows the current count against a limit and turns red when it goes over. Announces changes politely to screen readers.",
  "dependencies": [],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/character-count.tsx",
      "type": "registry:ui",
      "target": "components/ui/character-count.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nfunction CharacterCount({\n  value = 0,\n  max,\n  className,\n}: {\n  value?: number\n  max: number\n  className?: string\n}) {\n  const over = value > max\n  return (\n    <p\n      data-slot=\"character-count\"\n      aria-live=\"polite\"\n      className={cn(\n        \"text-xs tabular-nums\",\n        over ? \"text-danger\" : \"text-fg-muted\",\n        className\n      )}\n    >\n      {value}/{max}\n    </p>\n  )\n}\nexport { CharacterCount }\n"
    }
  ]
}
