Skip to content
Magma Design System
Button dropdown<mds-button-dropdown>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".active - booleanSpecifies if the button is active or not
autoFocusauto-focusbooleanSpecifies if the component is focused when is loaded on the viewport
await - boolean | undefinedSpecifies if the button is awaiting for a response
disabled - boolean | undefinedSpecifies if the component is disabled or not
href - string | undefinedSpecifies the URL target of the button
icon - string | undefinedThe icon displayed in the button
label - stringSpecifies le text label of the component
name - string | undefinedThe name sent with value to the form the primary action submits, as a native submit button does
size - lg | md | sm | xlmdSpecifies the size for the button
target - blank | selfselfSpecifies the target of the URL, if self or blank
tone - strong | weak | undefinedstrongSpecifies the tone variant for the button
truncate - all | none | word | undefinedwordSpecifies if the text shoud be truncated or should behave as a normal text
type - a | button | reset | submit | undefinedbuttonThe type of the primary action: with 'submit' or 'reset' it submits or resets the form the component is in, the chevron never does. Unlike mds-button it defaults to 'button'
value - string | undefinedThe value sent under name to the form the primary action submits
variant - ai | dark | error | info | light | primary | secondary | success | warning | undefinedprimarySpecifies the color variant for the button
Events
mdsButtonDropdownClickvoidEmits when the primary action is clicked or activated from the keyboard, unless the component is disabled or awaiting. The chevron and the menu items do not emit it, while a native click on the component also comes from the menu items
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. When the component has a label prop too, prefer the prop.(default)Add text string, HTML elements or components to this slot.
No slot name