TooltipContent() — ui Function Reference
Architecture documentation for the TooltipContent() function in tooltip.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 30a82496_8824_5e6b_b606_81b694f3a070["TooltipContent()"] 821c6563_65d3_5eb1_118c_b168cff9ab59["tooltip.tsx"] 30a82496_8824_5e6b_b606_81b694f3a070 -->|defined in| 821c6563_65d3_5eb1_118c_b168cff9ab59 style 30a82496_8824_5e6b_b606_81b694f3a070 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/ui/tooltip.tsx lines 32–54
function TooltipContent({
className,
sideOffset = 0,
children,
...props
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
return (
<TooltipPrimitive.Portal>
<TooltipPrimitive.Content
data-slot="tooltip-content"
sideOffset={sideOffset}
className={cn(
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs",
className
)}
{...props}
>
{children}
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
</TooltipPrimitive.Content>
</TooltipPrimitive.Portal>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TooltipContent() do?
TooltipContent() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/tooltip.tsx.
Where is TooltipContent() defined?
TooltipContent() is defined in apps/v4/examples/radix/ui/tooltip.tsx at line 32.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free