3.0.2 • Published 6 months ago

@maggioli-design-system/mds-input-switch v3.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

mds-input-switch

This is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.

Properties

PropertyAttributeDescriptionTypeDefault
autofocusautofocusSets or returns whether a checkbox should automatically get focus when the page loadsbooleanundefined
checkedcheckedSpecifies that an element should be pre-selected when the page loads (for type="checkbox" or type="radio")boolean \| undefinedundefined
disableddisabledSets or returns whether a checkbox is disabled, or notboolean \| undefinedundefined
explicitexplicitSets if the type switch mode shows explicit iconsboolean \| undefinedundefined
iconiconThe checked icon displayedstring''
indeterminateindeterminateSets or returns the indeterminate state of the checkboxboolean \| undefinedundefined
namenameSpecifies the name of an elementstring''
sizesizeSpecifies the size for the switch toggle, it works only if attribute 'type' is set to 'switch'"lg" \| "md" \| "sm"'md'
typetypeSpecifies switch type: switch (default), checkbox and radio"checkbox" \| "radio" \| "switch"'switch'
typographytypographySpecifies the font typography of the element"caption" \| "detail" \| "label" \| "option" \| "paragraph" \| "tip" \| undefined'detail'
valuevalueSpecifies the value of the input elementstring \| undefined''
variantvariantSpecifies the variant for typography"code" \| "info" \| "read" \| "title" \| undefinedundefined

Events

EventDescriptionType
mdsInputSwitchChangeEmits when the value changesCustomEvent<MdsInputSwitchEventDetail>

Methods

updateLang() => Promise<void>

Returns

Type: Promise<void>

Slots

SlotDescription
"default"Put text string or elements here

CSS Custom Properties

NameDescription
--mds-input-switch-animation-timing-adjustSet the size multiplier when the switch toggle is resizing by animation
--mds-input-switch-animation-timing-functionSet the timing function of the animation
--mds-input-switch-box-color-disabled-checkedSet the color of the switch when the switch is disabled and checked
--mds-input-switch-box-color-disabled-uncheckedSet the color of the switch when the switch is disabled and unchecked
--mds-input-switch-box-color-enabled-checkedSet the color of the switch when the switch is checked
--mds-input-switch-box-color-enabled-uncheckedSet the color of the switch when the switch is unchecked
--mds-input-switch-box-padding-lgSet the padding of the switch toggle's container
--mds-input-switch-box-padding-mdSet the padding of the switch toggle's container
--mds-input-switch-box-padding-smSet the padding of the switch toggle's container
--mds-input-switch-durationSet the duration of the animation
--mds-input-switch-icon-color-checkedSet the color of the icon when the switch is checked
--mds-input-switch-icon-color-checked-disabledSet the color of the icon when the switch is disabled and checked
--mds-input-switch-icon-color-indeterminateSet the color of the icon when the switch is indeterminate
--mds-input-switch-icon-color-indeterminate-disabledSet the color of the icon when the switch is disabled and indeterminate
--mds-input-switch-icon-color-uncheckedSet the color of the icon when the switch is unchecked
--mds-input-switch-icon-color-unchecked-disabledSet the color of the icon when the switch is disabled and unchecked
--mds-input-switch-toggle-color-disabled-checkedSet the color of the switch toggle when the switch is disabled and checked
--mds-input-switch-toggle-color-disabled-uncheckedSet the color of the switch toggle when the switch is disabled and unchecked
--mds-input-switch-toggle-color-enabled-checkedSet the color of the switch toggle when the switch is checked
--mds-input-switch-toggle-color-enabled-uncheckedSet the color of the switch toggle when the switch is unchecked
--mds-input-switch-toggle-size-lgSets the size of the switch toggle
--mds-input-switch-toggle-size-mdSets the size of the switch toggle
--mds-input-switch-toggle-size-smSets the size of the switch toggle

Dependencies

Used by

Depends on

Graph

graph TD;
  mds-input-switch --> mds-icon
  mds-input-switch --> mds-text
  mds-table-header --> mds-input-switch
  mds-table-row --> mds-input-switch
  style mds-input-switch fill:#f9f,stroke:#333,stroke-width:4px

Built with love @ Gruppo Maggioli from R&D Department

3.0.2

6 months ago

3.0.1

7 months ago

3.0.0

8 months ago

2.0.3

10 months ago

2.2.0

9 months ago

2.0.2

12 months ago

2.0.4

10 months ago

2.1.0

9 months ago

2.0.1

12 months ago

2.0.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago