Skip to content
Magma Design System
Pref theme<mds-pref-theme>Generated from @maggioli-design-system/magma@2.3.0dist/documentation.json. Encapsulation: shadow.
Magma components are web components: custom elements you write like HTML tags, with any framework or without one. Props configure them, events tell you what happened, methods are functions you call on the element and slots take the content you put inside it.
Props
Set a prop as an HTML attribute in the markup, or as a property from JavaScript. The Attribute column gives the name of the attribute, a dash when it is the same as the property; props without one, such as arrays and functions, are set from JavaScript only. To turn a boolean attribute off, remove it: never write disabled="false".cornerShapecorner-shapebevel | default | notch | round | scoop | square | squircle | undefinedSpecifies the corner geometry of the whole page: one of the corner-shape keywords, or default. Corner geometry is theme appearance rather than an accessibility preference, which is why it lives here next to the theme name and scheme instead of in mds-pref-mode. Setting it writes data-corner-shape on <html>, where the generated axis picks both the shape and the radius scale tuned for it. Leaving it unset touches nothing. Setting it to default REMOVES the attribute rather than writing today’s default into the page, so a project that never chose keeps following the design system when the default changes.
name - stringdefaultSpecifies the theme name attribute A string representing the theme name, should be a simple string name or kebab kase name. Examples of valid language codes include "magma", "maggioli-editore", etc.
scheme - all | dark | lightallSpecifies the theme scheme which can be ‘light’, ‘dark’ or ‘all’ Default is ‘all’ which means this theme supporto both light and dark. If you set ‘light’ means this theme support only light mode and will be forced and shown light colors mode only.
size - md | sm | undefinedSets the size of the component items nested inside it
Events
mdsPrefChangeMdsPrefChangeEventDetailEmits when the component is triggered
mdsPrefThemeChangeMdsPrefThemeEventDetailEmits when the component changes the language selected from the click event of the dropdown list item
Slots
Slots take the content you write between the tags of the component. The default slot, the one without a name, accepts plain text, unless its description says otherwise.(default)Add mds-pref-theme-item element/s.
No slot name