ToolTip
The Tooltip component is used render a small info toast for any content, when it is hovered.
Usage#
To use the tooltip component wrap it over the content, for which you need to show the ToolTip. The label prop is used
to render the text for the tooltip
Code#
Placement#
The ToolTip component position can also be varied by using the placement prop which accepts a string value.
The accepted values are the following, each reperesents a seperate position for the component,
"right""right-start""right-end""top""top-start""top-end""left""left-start""left-end""bottom""bottom-start""bottom-end"
LEFT
TOP
BOTTOM
RIGHT
Code#
Width#
The width of the ToolTip can also be adjusted by using the width prop. This prop accepts number value.
Custom Width
Default Width
Code#
API#
| Prop | Type | Possible values | Default Value |
|---|---|---|---|
| position | string | "top","bottom","left" and "right" | "right" |
| label | string | Any string value | -- |
| width | number | Any number value | 500 |
Built by Akshay 🤙