Back to Tuist

Tooltip

noora/docs/components/tooltip.md

4.204.01.6 KB
Original Source
<!-- Generated by scripts/generate-web-components.js. Do not edit directly. -->

Tooltip

Explains an element on pointer hover or keyboard focus.

html
<noora-tooltip title="Copy"><button slot="trigger">Copy</button></noora-tooltip>

Attributes

AttributeType or allowed valuesDefaultDescription
disabledbooleanfalseDisables the tooltip.
sizesmall, large"small"Controls the content layout.
titlestring""Sets the tooltip title.
descriptionstringNoneSets the large-tooltip description.
openbooleanfalseControls whether the tooltip is open.

Events

EventTypeDescription
noora-open-changeCustomEvent<{ open: boolean }>Emitted when the tooltip opens or closes.

Slots

SlotDescription
triggerThe described element.
iconAn icon shown by large tooltips.

Styling parts

PartDescription
triggerThe trigger wrapper.
contentThe tooltip content.

Default

Explain an icon or compact action.

html
<noora-tooltip title="Tooltip"><noora-icon slot="trigger" name="alert_circle" label="More information"></noora-icon></noora-tooltip>

Large

Add an icon and supporting description.

html
<noora-tooltip size="large" title="Tooltip" description="Insert tooltip description here. Three lines of text would look better."><noora-icon slot="trigger" name="alert_circle" label="More information"></noora-icon><noora-icon slot="icon" name="category"></noora-icon></noora-tooltip>