@lion/ui
Version:
A package of extendable web components
67 lines (55 loc) • 13 kB
Markdown
---
parts:
- API Table
- Tooltip
title: 'Tooltip: API Table'
eleventyNavigation:
key: API Table >> Tooltip
title: API Table
order: 90
parent: Tooltip
---
# Tooltip: API Table
## class: `LionTooltip`, `lion-tooltip`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ---------------------------- | --------- | ------------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
| `hasArrow` | public | `boolean` | `false` | Whether an arrow should be displayed | ArrowMixin |
| `invokerRelation` | public | `'label'\|'description'` | `'description'` | Decides whether the tooltip invoker text should be considered a description
(sets aria-describedby) or a label (sets aria-labelledby). | |
| `opened` | public | `boolean` | `false` | If you add the opened attribute a dialog will be opened on page load. The invoker can be left out
in case the user does not need to be able to reopen the dialog. | OverlayMixin |
| `_arrowNode` | protected | | | | ArrowMixin |
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
| `_overlayContentNode` | protected | | | | OverlayMixin |
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
| `_overlayInvokerNode` | protected | | | | OverlayMixin |
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| ---------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------ | -------------- |
| `close` | public | Hides the overlay | | | OverlayMixin |
| `open` | public | Shows the overlay | | | OverlayMixin |
| `repositionOverlay` | public | Sometimes it's needed to recompute Popper position of an overlay, for instance when we have
an opened combobox and the surrounding context changes (the space consumed by the textbox
increases vertically) | | | OverlayMixin |
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
| `_arrowNodeTemplate` | protected | | | | ArrowMixin |
| `_arrowTemplate` | protected | | | | ArrowMixin |
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
| `_defineOverlayConfig` | protected | Overrides arrow and keepTogether modifier to be enabled,
and adds onCreate and onUpdate hooks to sync from popper state | | `OverlayConfig` | OverlayMixin |
| `_getPopperArrowConfig` | protected | | `popperConfigToExtendFrom: Partial<PopperOptions>` | `Partial<PopperOptions>` | ArrowMixin |
| `_isPermanentlyDisconnected` | protected | When we're moving around in dom, disconnectedCallback gets called.
Before we decide to teardown, let's wait to see if we were not just moving nodes around. | | `Promise<boolean>` | OverlayMixin |
| `_setOpenedWithoutPropertyEffects` | protected | When the opened state is changed by an Application Developer,cthe OverlayController is
requested to show/hide. It might happen that this request is not honoured
(intercepted in before-hide for instance), so that we need to sync the controller state
to this webcomponent again, preventing eternal loops. | `newOpened: boolean` | | OverlayMixin |
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
### Events
| Name | Type | Description | Inherited From |
| ---------------- | ------------- | ----------- | -------------- |
| `opened-changed` | `CustomEvent` | | OverlayMixin |
### Attributes
| Name | Field | Inherited From |
| ------------------ | --------------- | -------------- |
| `invoker-relation` | invokerRelation | |
| `has-arrow` | hasArrow | ArrowMixin |
| `opened` | opened | OverlayMixin |
<hr/>