Tooltip
Shows a short label near a target element on hover or focus. Long labels wrap, and the tooltip stays open while the pointer travels onto it.
Base
Mantine + override
Mantine
Import
{ Tooltip } from '@mantine/core'
Source
src/themes/component-overrides/overlays.ts
src/themes/style-overrides/tooltip.module.css
Usage
position
withArrow
events.focus
React
<Tooltip label="Lagre endringene" position="top" events={{ hover: true, focus: false, touch: false }}>
<Button variant="secondary">Hold pekeren her, eller tab hit</Button>
</Tooltip>
Props
Only what this design system changes. Everything else is Mantine's — read the full props table there.
| Property | Type | Allowed values | Default | Description |
|---|---|---|---|---|
interactive | boolean | — | true | Keeps the tooltip open while the pointer travels from the target onto the tooltip. Mantine ships it off. |
multiline | boolean | — | true | Lets long labels wrap instead of forcing the tooltip into one growing line. Mantine ships it off. |
maw | number | string | — | 320 | Caps the tooltip width. Long labels wrap at this width. |
padding (styles.tooltip) | — | — | 8px / 16px | Not a prop — block and inline padding set in the theme (spacing.sm / spacing.md). |
background (styles.tooltip) | — | — | dark-grey-5 / dark-grey-2 | Not a prop — the tooltip stays dark in both colour schemes, with the shade set per scheme. Mantine's own flips to a light box with dark text in dark mode. |
events | { hover: boolean; focus: boolean; touch: boolean } | — | { hover: true, focus: false, touch: false } | Chooses which interactions open the tooltip. Not changed by the theme, so focus does not open it unless the instance sets focus: true. |
Accessibility
A tooltip opens on mouse hover only. Set events={{ hover: true, focus: true, touch: false }} on every tooltip that carries information a keyboard user
needs. See Accessibility for the
theme-wide rules.