Home / Function/ TooltipContent() — ui Function Reference

TooltipContent() — ui Function Reference

Architecture documentation for the TooltipContent() function in tooltip.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  d833fb0f_2ef9_9556_2687_16eea423b2ec["TooltipContent()"]
  17352323_392c_f909_cedd_2b576d844848["tooltip.tsx"]
  d833fb0f_2ef9_9556_2687_16eea423b2ec -->|defined in| 17352323_392c_f909_cedd_2b576d844848
  style d833fb0f_2ef9_9556_2687_16eea423b2ec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui-rtl/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>
  )
}

Subdomains

Frequently Asked Questions

What does TooltipContent() do?
TooltipContent() is a function in the ui codebase, defined in apps/v4/examples/radix/ui-rtl/tooltip.tsx.
Where is TooltipContent() defined?
TooltipContent() is defined in apps/v4/examples/radix/ui-rtl/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