6.7.2 • Published 5 months ago

@maggioli-design-system/mds-button v6.7.2

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

mds-button

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
activeactiveSpecifies if the button is active or notbooleanundefined
autoFocusauto-focusSpecifies if the component is focused when is loaded on the viewportbooleanundefined
awaitawaitSpecifies if the button is awaiting for a responseboolean \| undefinedundefined
disableddisabledSpecifies if the component is disabled or notboolean \| undefinedundefined
hrefhrefSpecifies the URL target of the buttonstring \| undefinedundefined
iconiconThe icon displayed in the buttonstring \| undefinedundefined
iconPositionicon-positionSpecifies the horizontal position of the icon displayed in the button"left" \| "right" \| undefined'left'
sizesizeSpecifies the size for the button"lg" \| "md" \| "sm" \| "xl"'md'
targettargetSpecifies the target of the URL, if self or blank"blank" \| "self"'self'
tonetoneSpecifies the tone variant for the button"ghost" \| "quiet" \| "strong" \| "weak" \| undefined'strong'
truncatetruncateSpecifies if the text shoud be truncated or should behave as a normal text"all" \| "none" \| "word" \| undefined'word'
typetypeThe type of the button element"a" \| "button" \| "reset" \| "submit" \| undefined'submit'
variantvariantSpecifies the color variant for the button"ai" \| "apple" \| "dark" \| "error" \| "google" \| "info" \| "light" \| "primary" \| "secondary" \| "success" \| "warning" \| undefined'primary'

Slots

SlotDescription
"default"Add text string to this slot, avoid to add HTML elements or components here.
"notification"Add HTML elements or components, it is recommended to use mds-notification element.

Shadow Parts

PartDescription
"icon"The icon inside the component
"label"

CSS Custom Properties

NameDescription
--mds-button-await-durationSets the duration of the rotation of the spinner await component
--mds-button-backgroundSets the background-color of the component
--mds-button-border-colorSets the color of the border of the component (based on box-shadow declaration)
--mds-button-border-default-opacitySets the default opacity of the border color of the component (based on box-shadow declaration)
--mds-button-border-high-contrast-hover-widthSets the width of the border when the component is hovered and the contrast is high (based on box-shadow declaration)
--mds-button-border-high-contrast-widthSets the width of the border of the component and the contrast is high (based on box-shadow declaration)
--mds-button-border-hover-opacitySets the opacity of the border color when the component is hovered (based on box-shadow declaration)
--mds-button-border-opacitySets the border opacity of the component (based on box-shadow declaration)
--mds-button-border-tone-ghost-hover-widthSets the width of the border when the component is hovered when the tone is set to ghost (based on box-shadow declaration)
--mds-button-border-tone-strong-hover-widthSets the width of the border when the component is hovered when the tone is set to strong (based on box-shadow declaration)
--mds-button-border-tone-weak-hover-widthSets the width of the border when the component is hovered when the tone is set to weak (based on box-shadow declaration)
--mds-button-border-widthSets the border width of the component (based on box-shadow declaration)
--mds-button-colorSets the text color of the component
--mds-button-gapSets the distance betwen element inside the components, use it instead of setting gap property directly.
--mds-button-radiusSets the border-radius of the component

Dependencies

Used by

Depends on

Graph

graph TD;
  mds-button --> mds-spinner
  mds-button --> mds-icon
  mds-button --> mds-text
  mds-banner --> mds-button
  mds-breadcrumb --> mds-button
  mds-calendar --> mds-button
  mds-calendar-cell --> mds-button
  mds-chip --> mds-button
  mds-file-preview --> mds-button
  mds-header-bar --> mds-button
  mds-horizontal-scroll --> mds-button
  mds-img --> mds-button
  mds-input --> mds-button
  mds-input-date --> mds-button
  mds-input-date-range --> mds-button
  mds-input-date-range-preselection --> mds-button
  mds-input-upload --> mds-button
  mds-keyboard --> mds-button
  mds-label --> mds-button
  mds-modal --> mds-button
  mds-note --> mds-button
  mds-policy-ai --> mds-button
  mds-pref-language-item --> mds-button
  mds-push-notification --> mds-button
  mds-push-notification-item --> mds-button
  mds-radial-menu --> mds-button
  mds-radial-menu-item --> mds-button
  mds-tab-item --> mds-button
  mds-table-header-cell --> mds-button
  mds-tree-item --> mds-button
  mds-url-view --> mds-button
  style mds-button fill:#f9f,stroke:#333,stroke-width:4px

Built with love @ Gruppo Maggioli from R&D Department

6.1.0

11 months ago

6.3.0

8 months ago

6.5.0

7 months ago

6.1.3

10 months ago

6.4.3

8 months ago

6.6.0

7 months ago

6.4.2

8 months ago

6.0.0

11 months ago

6.2.0

9 months ago

6.4.1

8 months ago

6.4.0

8 months ago

6.7.0

6 months ago

6.7.2

5 months ago

6.7.1

6 months ago

5.1.0

1 year ago

4.18.2

1 year ago

5.0.0

1 year ago

4.18.1

1 year ago

4.18.0

1 year ago

4.17.5

2 years ago

4.17.3

2 years ago

4.17.4

2 years ago

4.17.2

2 years ago

4.17.0

2 years ago

4.15.0

2 years ago

4.16.0

2 years ago

4.12.4

2 years ago

4.12.3

2 years ago

4.12.2

2 years ago

4.9.0

2 years ago

4.8.1

2 years ago

4.8.0

2 years ago

4.9.1

2 years ago

4.11.0

2 years ago

4.12.0

2 years ago

4.12.1

2 years ago

4.7.1

2 years ago

4.7.0

2 years ago

4.3.5

3 years ago

4.5.0

3 years ago

4.6.0

3 years ago

4.3.3

3 years ago

4.3.2

3 years ago

3.2.3-dev.0.1

3 years ago

3.3.1

3 years ago

3.2.2

3 years ago

3.2.1

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

4.3.0

3 years ago

3.3.0-dev.1.0

3 years ago

4.2.0

3 years ago

3.3.0-dev.1.2

3 years ago

3.3.0-dev.1.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.0

4 years ago