Skip to content

Commit b1767c9

Browse files
committed
➕ Add example for multiline tooltip
1 parent e08aa4c commit b1767c9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/pages/components/tooltip.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ A tooltip provides additional information for an element on hover or focus.
1010

1111
### Position
1212

13-
Use the `data-tooltip` attribute on any element to attach a tooltip that appears above the element on hover or focus. Linebreaks can be used too.
13+
Use the `data-tooltip` attribute on any element to attach a tooltip that appears above the element on hover or focus. Linebreaks can be inserted too using the `
` line break entity (or another line break character suitable for your use case).
1414

1515
<div class="demo">
1616
<button data-tooltip="Initiate self-destruction">I'm harmless</button>
17+
<button class="alert" data-tooltip="On second thought&#10;I won't do anything">I'm dangerous</button>
1718
</div>
1819

1920
```html
2021
<button data-tooltip="Initiate self-destruction">I'm harmless</button>
22+
<button class="alert" data-tooltip="On second thought&#10;I won't do anything">I'm dangerous</button>
2123
```
2224

2325
To change position, use the `tooltip-left`, `tooltip-bottom` or `tooltip-right` classes accordingly.

0 commit comments

Comments
 (0)