Skip to main content

Tooltip

caution

All props/parameters are optional unless they are marked with an asterisk ( * ).

Example

import { components } from "replugged";
const { Tooltip } = components;

<Tooltip text="Tooltip text">{/* Your components here */}</Tooltip>;

Enums

EnumDescription
Tooltip.AlignsTooltip alignments
TOP | CENTER | BOTTOM | LEFT | RIGHT
Tooltip.ColorsTooltip colors
PRIMARY | BLACK | GREY | BRAND | GREEN | YELLOW | RED | CUSTOM | PREMIUM
Tooltip.PositionsTooltip positions
TOP | BOTTOM | LEFT | RIGHT | CENTER | WINDOW_CENTER

Props

NameTypeDefaultDescription
alignTooltip.AlignsTooltip.Aligns.CENTERTooltip alignment to the children; works together with position
allowOverflowbooleanfalseWhether the tooltip content can overflow
classNamestringComponent class name
clickableOnMobilebooleantrueWhether the tooltip shows up on click if app is in mobile view
colorTooltip.ColorsTooltip.Colors.PRIMARYSets color of the tooltip
delaynumberHow long the tooltip takes to appear in milliseconds
disableTooltipPointerEventsbooleanfalseWhether to disable pointer events on the tooltip
forceOpenbooleanfalseWhether the tooltip is always visible
hideOnClickbooleantrueWhether the tooltip hides after clicking anywhere
onAnimationRest(result: unknown, spring: unknown, item?: unknown) => voidFunction ran when the tooltip is animating; its parameters are related to react-spring
onTooltipShow() => voidFunction ran when the tooltip shows up
positionTooltip.PositionsTooltip.Positions.TOPTooltip position; works together with align
shouldShowbooleantrueWhether the tooltip can show
spacingnumber8Distance from the children
styleCSSPropertiesComponent style
text* stringTooltip text
tooltipClassNamestringTooltip element class name
tooltipContentClassNamestringTooltip content element class name