Tooltip

The tooltip component, at a minimum, has a container, a pointer arrow, and a message. A button icon pointer, badge, image and close button can also be added.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Click Me!

Usage

import { Tooltip } from 'bio-bind-ui';
<Tooltip
  delay={200}
  event='hover'
  id='tooltip'
  mode='light'
  placement='top-center'
  showArrow
  textSize='sm'
/>

Examples

TextSize

To modify the text size in a tooltip component UI: xs, sm, md, lg, xl, 2xl

Text XS


Text SM


Text MD


Text LG


Text XL


Text 2XL


Mode (Optional)

Use mode for change color mode of tooltip component: light or dark

Light


Dark


Props

PropsRequiredDefaultTypeDescription
textfalse-React.ReactNodeThe text content of the tooltip, which can be any valid React node.
showArrowfalsetruebooleanIndicates whether to show the arrow in the tooltip.
placementfalsetop-centertop-start, top-center, top-end, right-start, right-center, right-end, bottom-start, bottom-center, bottom-end, left-start, left-center, left-endThe placement of the tooltip relative to the target element.
modefalselightdark, lightThe mode of the tooltip, either dark or light.
idtrue-stringThe unique identifier for the tooltip component, useful for accessibility or targeting specific elements.
eventtruehoverhover, clickThe event that triggers the tooltip display, either hover or click.
textSizefalsemdxs, sm, md, lg, xl, 2xlThe text size of the tooltip.
showCloseIconfalsefalsebooleanIndicates whether to show a close icon in the tooltip.
delayfalse200numberThe delay (in milliseconds) before the tooltip appears or disappears.
imagefalse-<HTMLImageElement>The image to be displayed in the tooltip, if applicable.
stylefalse{}React.CSSPropertiesThe custom styles for the tooltip component.
classNamefalse-stringThe class name of the tooltip component for styling.
BIND © Biofarma Innovate Next-level Design .