Tooltip

Default

Hover here (Top)
Hover here (Bottom)
Hover here (Right)
Hover here (Left)

Content Interaction


Set the prop interaction as true for cases that require users to copy the content inside the tooltip.

Using Common Selectors


Re-using Tooltip Instances

You can re-use Tooltip by sending trigger_element_selector as a HTML class= attribute.

Tooltip Sizing


You can customize the height and width of the tooltip's popover.

When using maxHeight, be sure to set a width as well. The text needs to truncate within the width prop.

Tooltip with Icon


Icon Circle Tooltip


Delay


Waits for the specified time when the event listener runs before triggering the tooltip.

The delay_open and delay_close accept numbers in milliseconds. 1 second is 1000 milliseconds.

Show Tooltip

Tooltip is: enabled
Hover me

You can build your own logic to control whether to show or hide the tooltip.

Click on the Toggle state button to change the state of the component and hover over the 'hover me' text to see it in action.

Each Tooltip has a dataset with the pbTooltipShowTooltip property set to true by default. To update it, access the pbTooltipShowTooltip in the dataset of your tooltip element: yourTooltip.dataset.pbTooltipShowTooltip = 'false'

Click to Open


Set the prop use_click_to_open as true so that the tooltip will only appear when an item is clicked rather than hovered over.



Available Props

Props Type Values

align_content

enum | responsive
start
end
center
spaceBetween
spaceAround
spaceEvenly

align_items

enum | responsive
start
end
center

border_radius

enum
none
xs
sm
md
lg
xl
rounded

cursor

enum
auto
default
none
contextMenu
help
pointer
progress
wait
cell

dark

boolean
true
false

flex

enum | responsive
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none

flex_direction

enum | responsive
row
column
rowReverse
columnReverse

flex_wrap

enum | responsive
wrap
nowrap
wrapReverse

justify_content

enum | responsive
start
end
center
spaceBetween
spaceAround
spaceEvenly

line_height

enum
loosest
looser
loose
normal
tight
tighter
tightest

margin_right

array
none
xxs
xs
sm
md
lg
xl

margin_left

array
none
xxs
xs
sm
md
lg
xl

margin_top

array
none
xxs
xs
sm
md
lg
xl

margin_bottom

array
none
xxs
xs
sm
md
lg
xl

margin_x

array
none
xxs
xs
sm
md
lg
xl

margin_y

array
none
xxs
xs
sm
md
lg
xl

margin

array
none
xxs
xs
sm
md
lg
xl

width

string

min_width

string

max_width

string

gap

string | responsive

column_gap

string | responsive

row_gap

string | responsive

number_spacing

enum
tabular

order

enum | responsive
none
first
1
2
3
4
5
6
7
8
9
10
11
12

overflow_x

enum
scroll
visible
hidden
auto

overflow_y

enum
scroll
visible
hidden
auto

overflow

enum
scroll
visible
hidden
auto

padding_right

array
none
xxs
xs
sm
md
lg
xl

padding_left

array
none
xxs
xs
sm
md
lg
xl

padding_top

array
none
xxs
xs
sm
md
lg
xl

padding_bottom

array
none
xxs
xs
sm
md
lg
xl

padding_x

array
none
xxs
xs
sm
md
lg
xl

padding_y

array
none
xxs
xs
sm
md
lg
xl

padding

array
none
xxs
xs
sm
md
lg
xl

position

enum
relative
absolute
fixed
sticky
static

shadow

enum
none
deep
deeper
deepest

text_align

enum | responsive
start
end
left
right
center
justify
justifyAll
matchParent

truncate

enum
none
1
2
3
4
5

vertical_align

enum | responsive
baseline
super
top
middle
bottom
sub
text-top
text-bottom

z_index

enum | responsive
1
2
3
4
5
6
7
8
9
10
max

top

enum | object
xxs
xs
sm
md
lg
xl
xxl

inset

boolean
true
false

right

enum | object
xxs
xs
sm
md
lg
xl
xxl

bottom

enum | object
xxs
xs
sm
md
lg
xl
xxl

left

enum | object
xxs
xs
sm
md
lg
xl
xxl

height

string

max_height

string

min_height

string

hover

object

group_hover

boolean
true
false
Props Type Values Default

use_click_to_open

boolean
true
false
false

delay

number | partial<{open: number; close: number}>

icon

string

interaction

boolean
true
false
false

placement

placement

text

string

show_tooltip

boolean
true
false

force_open_tooltip

boolean
true
false

delay_open

string

delay_close

string

tooltip_id

string

trigger_element_selector

string

trigger_element_id

string

trigger_method

enum
hover
click
hover