Skip to content

hd-tip

Live preview

<hd-tip text="Measured in the {{ device.zoneName }}">{{ cap.measure_temperature.value | temp: 1 }}</hd-tip>

Attributes and example

hd-tip

Explains what it wraps in a small bubble in the theme’s colours, instead of the browser’s own title tooltip: on hover, on focus and on a tap (a tap on it never reaches the tile’s own tap). The bubble stays inside the window and isn’t cut off by the tile. E.g. <hd-tip text="{{ m.estimatedText }}">≈</hd-tip>.

AttributeWhat it is
textrequiredWhat the bubble says.
<hd-tip text="Measured in the {{ device.zoneName }}">{{ cap.measure_temperature.value | temp: 1 }}</hd-tip>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

--hd-border
Lines round tiles and between parts.
--hd-border-width
How thick borders are.
--hd-ease-out
The easing of most movement.
--hd-focus
The outline round what has keyboard focus.
--hd-font-ui
The font of labels and running text.
--hd-motion-fast
A quick change, like a press. 0ms when nothing may move.
--hd-overlay
Menus, dialogs and popups over the page.
--hd-radius-sm
Small corners: chips, small buttons.
--hd-shadow
A tile’s shadow.
--hd-surface-raised
Something on a tile that stands out from it, like a button.
--hd-text
Text and big numbers.
--hd-text-2xs
CSS input read by hd-tip.

Exposed parts

hd-tip::part(bubble) {  /* Your styles */}

Style the host

hd-tip {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables