{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tooltip-radix",
  "type": "registry:ui",
  "title": "Tooltip (Radix)",
  "description": "A short text hint for a control that opens on hover after a delay and on keyboard focus, and closes with Escape, on Radix, Base UI or React Aria.",
  "author": "Design From Labs <https://labs.designfrom.com>",
  "categories": [
    "overlays",
    "radix"
  ],
  "docs": "Installed `Tooltip`. Import it from `@/components/ui/tooltip`.\n\nRadix and Base UI: wrap your app once in `TooltipProvider`, then compose `Tooltip`, `TooltipTrigger` and `TooltipContent`. React Aria: put the trigger and `Tooltip` inside `TooltipTrigger`.\n\nDocs and every variant: https://labs.designfrom.com/ui/tooltip",
  "dependencies": [
    "radix-ui@^1"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/tooltip-radix/tooltip.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/**\n * @dfl-header: v1, generated by labs.designfrom.com at build time\n * Item: tooltip-radix (Tooltip: Radix)\n * What: A short text hint for a control that opens on hover after a delay\n *    and on keyboard focus, and closes with Escape, on Radix, Base UI or\n *    React Aria.\n * Status: ready. License: MIT. Author: Design From Labs\n *    <https://labs.designfrom.com>\n * Source: https://github.com/Design-from-labs/labs @ 803b92c1a30e (examples/tooltip)\n * Credits: S-003 React (MIT); S-004 shadcn/ui and its registry schema (MIT);\n *    S-008 Tailwind CSS (MIT); S-027 WAI-ARIA Authoring Practices:\n *    Tooltip pattern (W3C Software and Document License); S-032 Radix\n *    Primitives (the unified radix-ui package) (MIT); S-033 Base UI\n *    (@base-ui/react) (MIT); S-034 React Aria Components\n *    (react-aria-components) (Apache-2.0)\n * Install: npx shadcn@latest add https://labs.designfrom.com/r/tooltip-radix.json\n *   npx shadcn@latest add @designfrom/tooltip-radix\n *   npx designfrom add tooltip\n *   npm i @designfrom/react, then import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"@designfrom/react/radix/tooltip\";\n * Requires: radix-ui, registry: utils\n * Docs: https://labs.designfrom.com/ui/tooltip (index: https://labs.designfrom.com/llms.txt)\n */\n\n// Wrap the app (or a section) once; it shares the open delay between\n// tooltips so moving across a toolbar does not wait again.\nfunction TooltipProvider({\n  delayDuration = 300,\n  ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n  return (\n    <TooltipPrimitive.Provider\n      data-slot=\"tooltip-provider\"\n      delayDuration={delayDuration}\n      {...props}\n    />\n  );\n}\n\nfunction Tooltip(props: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n  return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\nfunction TooltipTrigger(\n  props: React.ComponentProps<typeof TooltipPrimitive.Trigger>,\n) {\n  return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n  className,\n  sideOffset = 6,\n  children,\n  ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n  return (\n    <TooltipPrimitive.Portal>\n      <TooltipPrimitive.Content\n        data-slot=\"tooltip-content\"\n        sideOffset={sideOffset}\n        className={cn(\n          // Fades in from transparent on mount (@starting-style); opacity\n          // only, so it stays on the compositor. No motion when reduced.\n          \"z-50 w-fit max-w-xs rounded-md bg-foreground px-3 py-1.5 text-background text-xs leading-snug shadow-md transition-opacity duration-150 starting:opacity-0 motion-reduce:transition-none\",\n          className,\n        )}\n        {...props}\n      >\n        {children}\n        <TooltipPrimitive.Arrow className=\"fill-foreground\" />\n      </TooltipPrimitive.Content>\n    </TooltipPrimitive.Portal>\n  );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"
    }
  ],
  "meta": {
    "status": "ready",
    "license": "MIT",
    "author": "Design From Labs <https://labs.designfrom.com>",
    "source": {
      "repo": "https://github.com/Design-from-labs/labs",
      "commit": "803b92c1a30e0d513e1cb1ff5ca984b2a5f9b492",
      "path": "examples/tooltip"
    },
    "credits": [
      "S-003",
      "S-004",
      "S-008",
      "S-027",
      "S-032",
      "S-033",
      "S-034"
    ],
    "component": "tooltip",
    "kind": "component",
    "primitive": "radix",
    "iconSet": "none",
    "page": "https://labs.designfrom.com/ui/tooltip"
  }
}
