{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge-13",
  "title": "Removable tag",
  "description": "A taller outline tag with a roomy remove button.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/badge.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/badge/badge-13.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { XIcon } from '@/registry/ndeko/lib/icons';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Button } from '@/registry/ndeko/ui/button';\n\nconst REMOVE_TRANSITION: Transition = { duration: 0.15, ease: [0.2, 0, 0, 1] };\n\nconst REMOVE_VARIANTS: Variants = {\n  shown: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n  hidden: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n};\n\nconst FADE_VARIANTS: Variants = {\n  shown: { opacity: 1 },\n  hidden: { opacity: 0 },\n};\n\nfunction removeVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return REMOVE_VARIANTS;\n}\n\nexport default function Badge13() {\n  const [isShown, setIsShown] = useState(true);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const removeVariants = removeVariantsOf(shouldReduceMotion);\n\n  function remove() {\n    setIsShown(false);\n  }\n\n  return (\n    <AnimatePresence initial={false}>\n      {isShown && (\n        <motion.span\n          key='tag'\n          className='inline-flex'\n          variants={removeVariants}\n          initial='hidden'\n          animate='shown'\n          exit='hidden'\n          transition={REMOVE_TRANSITION}\n        >\n          <Badge variant='outline' className='h-7 gap-0 ps-2 pe-0'>\n            Research\n            <Button\n              variant='ghost'\n              size='icon-sm'\n              className='text-muted-foreground hover:text-foreground rounded-[inherit]'\n              aria-label='Remove Research tag'\n              onClick={remove}\n            >\n              <XIcon className='size-3.5' />\n            </Button>\n          </Badge>\n        </motion.span>\n      )}\n    </AnimatePresence>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "components",
    "badge"
  ],
  "type": "registry:component"
}