Tooltip
Display content in a portal hovered a element.
Anatomy
Mount all pieces together and create your Tooltip
import { Tooltip, Box, Text } from '@micode-ui/react';
<Tooltip content="You can now continue shipping">
<Text>Hover me</Text>
</Tooltip>
Example
Hover me
<Tooltip content="You can now continue shipping">
<Text>Hover me</Text>
</Tooltip>
API Reference
Contains all parts of the Tooltip.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
onEscapeKeyDown | function | |
onPointerDownOutside | function | |
forceMount | boolean | |
side | enum | "top" |
sideOffset | number | 0 |
align | enum | "center" |
alignOffset | number | 0 |
avoidCollisions | boolean | true |
collisionBoundary | Boundary | [] |
collisionPadding | number | Padding | 0 |
arrowPadding | number | 0 |
sticky | enum | "partial" |
hideWhenDetached | boolean | false |
Last updated on October 15, 2023