Tooltip<mds-tooltip>Generated from @maggioli-design-system/magma@2.3.0dist/documentation.json. Encapsulation: shadow.
Magma components are web components: custom elements you write like HTML tags, with any framework or without one. Props configure them, events tell you what happened, methods are functions you call on the element and slots take the content you put inside it.
Props
Set a prop as an HTML attribute in the markup, or as a property from JavaScript. The Attribute column gives the name of the attribute, a dash when it is the same as the property; props without one, such as arrays and functions, are set from JavaScript only. To turn a boolean attribute off, remove it: never write disabled="false".disableAutoPlacementdisable-auto-placementbooleanfalseIf set, the component will not be placed automatically near it’s caller.
disableShiftdisable-shiftbooleanfalseIf set, the component will not be kept inside the viewport.
flip
-
booleanfalseSpecifies the placement of the component if no space is available where it is placed.
offset
-
number12Sets distance between the tooltip and the caller.
placement
-
bottom | bottom-end | bottom-start | left | left-end | left-start | right | right-end | right-start | top | top-end | top-starttopSpecifies where the component should be placed relative to the caller.
relation
-
description | labeldescriptionSets what the tooltip is to its caller: its description (aria-describedby), or its
label (aria-labelledby), when the tooltip holds the only visible name of the caller, as on
an icon-only button.
shiftPaddingshift-paddingnumber12Sets a safe area distance between the tooltip and the viewport.
strategy
-
absolute | fixedfixedSets the CSS position strategy of the component.
target (required)
-
stringSpecifies the selector of the target element, this attribute is used with querySelector method.
typography
-
caption | detail | tiptipSpecifies the font typography of the element
visible
-
booleanfalseSpecifies the visibility of the component.
Slots
Slots take the content you write between the tags of the component. The default slot, the one without a name, accepts plain text, unless its description says otherwise.(default)Add text string to this slot, avoid to add HTML elements or components here.