Tooltip - Keep React

The Tooltips component in the Keep React allows you to provide additional information or context to users when they hover over or interact with specific elements. With customizable options for type, theme, and arrow placement, you can create versatile tooltips that fit your design needs.

Table of Contents#

Default Tooltip#

Tooltips appear on hover over an element and help convey concise explanations, tips, or labels. By using the Default Tooltip, you can enhance user understanding and improve the overall usability of your interface.

Tooltip Arrow#

An optional arrow element to render alongside the tooltip. This can be used to help visually link the trigger with the TooltipContent. Must be rendered inside TooltipContent.

Tooltip Placement#

To set the placement of a tooltip, use the side prop with the desired value, such as "top","bottom","left" and "right".

Tooltip Instantly Open#

Use the delayDuration prop to control the time it takes for the tooltip to open.

API Reference#

Explore the available props for the tooltip component

PropertyDescriptionTypeDefault
openThe controlled open state of the tooltip.booleanfalse
onOpenChangeEvent handler called when the open state of the tooltip changes.setStatenull

Content API#

Explore the available props for the tooltip content component

PropertyDescriptionTypeDefault
sidePlacement of the tooltip.
top
bottom
left
right
top
alignThe preferred alignment against the trigger.
start
center
end
center
alignOffsetThe preferred side of the anchor to render against when open.number10
arrowPaddingThe padding between the arrow and the edges of the content. number0

Provider API#

Explore the available props for the tooltip provider component

PropertyDescriptionTypeDefault
delayDurationThe duration from when the mouse enters a tooltip trigger until the tooltip opens.number700
skipDelayDurationHow much time a user has to enter another trigger without incurring a delay again.number300

Reference#

Our modal component is built using the @radix-ui/react-tooltip package. For more information , follow the documentation @radix-ui/react-tooltip.