Chip<mds-chip>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".clickable
-
boolean | undefinedAdds ARIA support to the element if has interaction
deletable
-
boolean | undefinedShows the cross icon to perform cancel/delete action on element
disabled
-
boolean | undefinedfalseSets the component disabled status
icon
-
string | undefinedThe icon displayed to the left of the component’s label
label (obbligatoria)
-
stringThe label displayed to the right of the component’s icon
selectable
-
boolean | undefinedfalseSets if the component change is status to selected when is clicked
selected
-
boolean | undefinedSets the component selected
tone
-
strong | weak | undefinedstrongSets the color variant tone of the component
variant
-
ai | amaranth | aqua | blue | dark | error | green | info | lime | orange | orchid | primary | purple | red | secondary | sky | success | violet | warning | yellow | undefinedprimarySets the color variant of the component
Eventi
mdsChipClickLabelMdsChipEventEmits when the component’s label is clicked
mdsChipDeleteMdsChipEventEmits when the component’s delete button is clicked
mdsChipSelectMdsChipEventEmits when the component’s label is clicked and when selectable attribute is set to true