Basic
Tooltips are small overlays that display information about an element when the user hovers over or interacts with it.
Preview
Code
Installation
CLI
Manual
npx hq-kit add tooltip
Placement
By default, the tooltip appears at the top, but you can change its position by using the placement
prop.
Preview
Code
Variant
Tooltip has two variants: default
and inverse
. You can change by using the variant
prop.
Preview
Code
Without Arrow
You can remove the arrow from the tooltip by setting the showArrow
prop to false
.
Preview
Code
Directions
The list above shows the primary directions, but you can also use more specific placements like bottom left
or top right
. Here are all the available placement options:
Primary Direction | Placement |
---|---|
bottom | bottom , bottom left , bottom right , bottom start , bottom end |
top | top , top left , top right , top start , top end |
left | left , left top , left bottom |
start | start , start top , start bottom |
right | right , right top , right bottom |
end | end , end top , end bottom |
Delay
Tooltip rolls out the welcome mat after you hover for 1.5 secs. Wanna speed it up or slow it down? Just slide in a delay
prop. Peep these guidelines for the scoop.
Preview
Code