Input switch<mds-input-switch>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".autofocus
-
booleanSets or returns whether a checkbox should automatically
get focus when the page loads
checked
-
boolean | undefinedSpecifies that an <input> element should be pre-selected
when the page loads (for type=“checkbox” or type=“radio”)
disabled
-
boolean | undefinedSets or returns whether a checkbox is disabled, or not
explicit
-
boolean | undefinedSets if the type switch mode shows explicit icons
icon
-
stringThe checked icon displayed
indeterminate
-
boolean | undefinedSets or returns the indeterminate state of the checkbox
name
-
stringSpecifies the name of an <input> element
size
-
lg | md | smmdSpecifies the size for the switch toggle, it works only if attribute ‘type’ is set to ‘switch’
type
-
checkbox | radio | switchswitchSpecifies switch type: switch (default), checkbox and radio
typography
-
caption | detail | label | option | paragraph | tip | undefineddetailSpecifies the font typography of the element
value
-
string | undefinedSpecifies the value of the input element
variant
-
code | info | read | title | undefinedSpecifies the variant for typography
Eventi
mdsInputSwitchChangeMdsInputSwitchEventDetailEmits when the value changes
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)Put text string or elements here