Dropdown<mds-dropdown>Generato da @maggioli-design-system/magma@2.3.0dist/documentation.json. Incapsulamento: shadow.
Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
I componenti Magma sono web component: elementi personalizzati che scrivi come i tag HTML, con qualsiasi framework o senza. Le proprietà li configurano, gli eventi dicono cosa è successo, i metodi sono funzioni da chiamare sull'elemento e gli slot accolgono il contenuto che metti al suo interno.
Proprietà
Imposta una proprietà come attributo HTML nel markup, oppure come proprietà da JavaScript. La colonna Attributo dà il nome dell'attributo, un trattino quando coincide con la proprietà; le proprietà senza attributo, come array e funzioni, si impostano solo da JavaScript. Per spegnere un attributo booleano, rimuovilo: non scrivere mai disabled="false".arrowPaddingarrow-paddingnumber24Sets the distance between arrow and dropdown margins.
backdrop
-
boolean | undefinedfalseSpecifies if the component has a backdrop background
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.
disableSmoothdisable-smoothbooleanfalseIf set, the component will not follow the caller smoothly when the page scrolls.
flip
-
booleanfalseSpecifies the placement of the component if no space is available where it is placed.
hideArrowhide-arrowbooleanfalseIf set, the component will not have an arrow pointing to the caller.
interaction
-
click | mouseover | noneclickSpecifies if the component is triggered from the caller on mouseover or click event
offset
-
number24Sets distance between the dropdown and the caller.
placement
-
bottom | bottom-end | bottom-start | left | left-end | left-start | right | right-end | right-start | top | top-end | top-startbottomSpecifies where the component should be placed relative to the caller.
shiftPaddingshift-paddingnumber24Sets a safe area distance between the dropdown and the viewport.
strategy
-
absolute | fixedabsoluteSets the CSS position strategy of the component.
target (obbligatoria)
-
stringSpecifies the selector of the target element, this attribute is used with querySelector method.
visible
-
booleanfalseSpecifies the visibility of the component.
zIndexz-indexnumberSpecifies the visibility of the component.
Eventi
mdsDropdownChangeMdsDropdownEventDetailEmits when a modal is visible or hidden
mdsDropdownHideMdsDropdownEventDetailEmits when a modal is hidden
mdsDropdownVisibleMdsDropdownEventDetailEmits when a modal is visible
Slot
Gli slot accolgono il contenuto che scrivi tra i tag del componente. Lo slot predefinito, quello senza nome, accetta solo testo, salvo dove la sua descrizione dice altrimenti.(predefinito)Add text string, HTML elements or components to this slot, elements will be shown when the component is triggered.