Skip to content

Tooltip โ€‹

...

Browser support โ€‹

...

Parameters โ€‹

The CSS component uses a <em> or a <td> tag inside a table.

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescription
z-tooltipstring

The main parameter has three components following the pattern: <side><?:size>.

  • side: The position of the tooltip. Can be top, top-right, top-left, bottom, bottom-right or bottom-left.
  • size: The size of the tooltip. Can be xs, s ,m or l.
tooltip-textstringThe text to be displayed inside the tooltip.
contentstringThe text to be hovered

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.3.6/@zurich/css-components/base.css" />
<link rel="stylesheet" href="/0.3.6/@zurich/design-tokens/Icons.css" />

<link rel="stylesheet" href="/0.3.6/@zurich/css-components/Tooltip.css" />
<link rel="stylesheet" href="/0.3.6/@zurich/css-components/Icon.css" />
Code
html
<em z-tooltip="top" tooltip-text="Add to calendar"><i z-icon="calendar:outline"></i></em>
<em z-tooltip="bottom-right" tooltip-text="Information text"><i z-icon="info:outline"></i></em>