Tooltip

Designer doc
Tooltips appear on hover, focus, or touch, and disappear after blur, mouse and touch leave, and click - including the keyboard handlers. On click, tooltips exit immediately.
Tooltip with similar behaviour can be found in:
  • macOS push button
  • Google Apps on Web (Calendar, Mail)
  • Chrome
  • Spotify
  • HTML element title

Example

Basic Usage
View code
Placements
Internally, Tooltip reexposes placement API from Tip component.
View code
Variants
By default, Coral Tooltip uses dark background. You can pass TooltipVariants.Light to variant prop to make it light.
View code
Open and Close Delay
Tooltip’s open and close events can be delayed by setting openDelay and closeDelay props. By default, openDelay is 100ms and closeDelay is 200ms, but these can be adjusted through the props.
View code
Tooltip Warmup & Cooldown
By default, Tooltip has a warmup & cooldown mechanism. Here’s how it works:
Warmup: When the page loads, tooltips are initially “cold” and won’t show immediately on hover. The first tooltip hover triggers a “warmup” period before the tooltip appears. After the tooltip is warmed up, the next tooltip hover will be shown immediately without delay.
Cooldown: After any tooltip is closed, there’s a 500ms grace period where tooltips remain “warm” and show immediately on hover. If no tooltip is hovered within this period, tooltips go into “cooldown” mode and require the warmup delay again.
This prevents accidental tooltip spam while maintaining responsive behavior once users start interacting with tooltips.
These mechanism will be affected by the openDelay and closeDelay. The warmup duration will use the tooltip’s openDelay value, while the cooldown period will take the maximum of the default duration (500ms) and the tooltip’s closeDelay value.
You can isolate a tooltip from the global warmup and cooldown mechanism by setting the isolated prop to true. This is useful when you want a tooltip to behave independently without affecting or being affected by other tooltips on the page.
View code
LabelTooltip
LabelTooltip is a specialized wrapper for Tooltip components, primarily designed for labelling IconButton component.
LabelTooltip has several key characteristics that make it ideal for icon button labelling: it displays without an arrow indicator, contains non-hoverable tooltip content, uses a default open delay of 500ms and close delay of 100ms, and is specifically optimized for icon button labelling scenarios.
View code
Nest Tooltip
Important: Tooltips cannot be nested. This is a fundamental limitation of the tooltip system to prevent UI conflicts and ensure proper user experience.
Additionally, tooltips cannot be used inside the title prop of another tooltip.
View code
Custom Events
Unlike Ant Design’s Popovers, this Tooltip does not provide special prop trigger, because it’s rather unnecessary and too specific.
Alternatively, any events triggering the tooltip can be defaultPrevented, controlled fully or partially based on onActiveChange callback.
Controlled
View code
If you control it into hover only events, note that it might have accessibility issue because keyboard users won’t be able to see it.
Using .preventDefault()
You can also use uncontrolled way. But, this is less recommended because you will need to understand and have more couplings between the internal state changes and your app. Prop initialActive is also supported.
View code
Tooltip with Balloon
Using Tooltip with Balloon on an element is not very straightforward. This is a tradeoff with the ease of use of each individually. However, here’s a way to get around the implementation using forwardRef:
View code
Custom child rendering
To make Tooltip component compatible with various kinds of child elements, you might need to customize the props passed to child element, renderChild will give you the flexibility to do so. You are encouraged to use cloneElement to return the child element.
View code

Relevant components

References

API

LabelTooltip
Prop nameTypeDefaultDescription
activeboolean
arrowArrowProps
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
closeDelaynumber100
containerHTMLElement
immediateboolean
initialActiveboolean
initialImmediateboolean
isolatedboolean
offset[number, number][0, 1]
onActiveChange(active: boolean) => void
onImmediateChange(immediate: boolean) => void
openDelaynumber500
placement"left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "left-start" | "left-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end"
popperOptionsPopperPopperOptions
Options for floating.ui instance
popperUpdateKeystring
renderChild(child: any, handlers: any, ariaAttrs: any) => ReactNode
springConfigPartial<AnimationConfig>
stayOpenOnHoverboolean
titleReactNode
titleContainerPropsHTMLAttributes<HTMLDivElement>
variantTooltipVariants
Tooltip
Prop nameTypeDefaultDescription
activeboolean
arrowArrowProps
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
closeDelaynumber200
containerHTMLElementconfigs.getPortalContainer('Tooltip', 'container')
immediateboolean
initialActiveboolean
initialImmediateboolean
isolatedboolean
offset[number, number][0, 3]
onActiveChange(active: boolean) => void
onImmediateChange(immediate: boolean) => void
openDelaynumber100
placement"left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "left-start" | "left-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end"top
popperOptionsPopperPopperOptions
Options for floating.ui instance
popperUpdateKeystring
renderChild(child: any, handlers: any, ariaAttrs: any) => ReactNode(child, handlers, ariaAttrs) => cloneElement(child, { ...handlers, ...ariaAttrs })
springConfigPartial<AnimationConfig>{ tension: 720, mass: 0.5 }
stayOpenOnHoverbooleantrue
titleReactNode
titleContainerPropsHTMLAttributes<HTMLDivElement>
variantTooltipVariantsdark
    Example
    Example
    Basic Usage
    Basic Usage
    Placements
    Placements
    Variants
    Variants
    Open and Close Delay
    Open and Close Delay
    Tooltip Warmup & Cooldown
    Tooltip Warmup & Cooldown
    LabelTooltip
    LabelTooltip
    Nest Tooltip
    Nest Tooltip
    Custom Events
    Custom Events
    Tooltip with Balloon
    Tooltip with Balloon
    Custom child rendering
    Custom child rendering
    Relevant components
    Relevant components
    References
    References
    API
    API
    LabelTooltip
    LabelTooltip
    Tooltip
    Tooltip
Coral is a thoroughly developed design system widely adopted by developers and designers for creating beautiful and user-friendly Sea internal products.

Copyright © 2018-2025 Sea Labs