For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/tooltip.md.
v0.0.57
  • English
  • Tooltip

    Data Display@rockshin/tao-ui

    Shows a brief informational popup when hovering or focusing an element.

    When to use

    Use Tooltip for short contextual hints on hover or focus. The popup is portaled and inherits the TaoProvider theme.

    Recommended

    • Keep tooltip text short and supplementary.
    • Wrap exactly one focusable trigger element.

    Avoid

    • Do not put critical information or interactive content inside a Tooltip.

    Examples

    Basic usage

    TSX

    Placements

    TSX

    Arrow, color, and controlled visibility

    TSX

    Hide the arrow

    Set arrow=false to remove the pointer.

    TSX

    Controlled tooltip

    Synchronize visibility through open and onOpenChange.

    TSX

    Custom color

    color customizes the background; retain readable contrast.

    TSX

    Hover delays

    Delays use seconds; keyboard focus does not wait for a hover delay.

    TSX

    Conditional content

    An empty title disables the tooltip so hints only appear when useful.

    TSX

    API

    Tooltip

    PropertyDescriptionTypeDefault Value
    titleTooltip content. Empty strings, booleans, null and undefined disable it.ReactNode-
    placementPopup side relative to the trigger. Defaults to 'top'.TooltipPlacement | undefined-
    arrowShow the arrow pointing at the trigger. Defaults to true.boolean | undefined-
    mouseEnterDelayHover delay in seconds before opening. Defaults to 0.1. Focus opens immediately.number | undefined-
    mouseLeaveDelayDelay in seconds before a pointer-leave closes the tooltip. Defaults to 0.1 (antd parity) — re-entering the trigger or content before the deadline cancels the close. Esc / focus-blur closes stay immediate.number | undefined-
    colorCustom content background color.string | undefined-
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-
    childrenExactly one trigger element.ReactNode (Required)-