TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shopware/meteor/llms.txt
Use this file to discover all available pages before exploring further.
MtSwitch component provides a toggle switch for on/off states, similar to a checkbox but with a different visual representation.
Import
Props
v-model binding for the switch state.
Label text for the switch.
Disables the switch.
Marks the field as required.
Alternative to modelValue for controlled state.
Adds a border around the switch.
Help text with additional information.
Error object with a detail property.
Removes the default top margin.
The name attribute for the input.
Indicates if the value is inherited.
Enables inheritance functionality.
The inherited value when isInherited is true.
Events
Emitted when the switch state changes.
Emitted when the switch is toggled.
Emitted when inheritance is removed.
Emitted when inheritance is restored.
Usage
Basic Switch
Bordered Switch
With Help Text
Disabled Switch
With Error State
Multiple Switches
Accessibility
- Uses native checkbox input with custom styling
- Label is clickable and properly associated
- Keyboard accessible (Space to toggle)
- Focus visible outline for keyboard navigation
- Disabled state prevents interaction
- ARIA attributes for screen readers
- Required state marked with asterisk