Toast<mds-toast>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".duration
-
number | undefined5000If set, specifies the visibility duration in milliseconds of the element inside the viewport, when the time is up the visible property will be set to false. If the duration is set to 0 the component will still visible until intentionally closed by user.
position
-
bottom-center | bottom-left | bottom-right | top-center | top-left | top-rightbottom-centerSets position of toast
tone
-
strong | weak | undefinedstrongSets the tone of the color variant
variant
-
ai | dark | error | info | light | primary | success | warning | undefinedlightSets the theme variant colours
visible
-
boolean | undefinedSpecifies if toast is visible at the bottom or not
Eventi
mdsToastClosevoidEmits when the accordion is opened
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. Il contenuto di uno slot con nome va su un figlio diretto, con il nome dello slot nell'attributo slot, ad esempio slot="action".(predefinito)Add text string to this slot, avoid to add HTML elements or components here.
Nessun nome slot
actionAdd HTML elements or components, it is recommended to use mds-button element.
iconInsert an icon image, it can be HTML elements or components, it is recommended to add mds-icon element.