8.2.0 • Published 5 months ago

@maggioli-design-system/mds-header v8.2.0

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

mds-header

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
appearanceappearanceSets the appearance of the header bar element when loaded, it can be changed depending on how appearance-set attribute is setstring'stripe'
appearanceSetappearance-setSets the appearance of the header bar element depending on the scroll position you should set three different values: initial appearance, changed appearance and window.scrollY threshold Es: appearance-set="stripe, inline 200" means the component will start with stripe appearance that will change to inline if the page is scrolled more of 199 pixelsstring \| undefinedundefined
autoHideauto-hideWhen the page is scrolled down, the component mds-header-bar is hidden starting from the autoHide attribute's value, then if the page is scrolled up it is shown againnumber \| undefinedundefined
backdropbackdropSets if the backdrop is shown when the mds-header-bar attribute appearace is set to inlineboolean \| undefinedtrue
menumenuSets the visibility type of the hamburger menu of mds-header-bar"all" \| "desktop" \| "mobile" \| "none"'mobile'
navnavSets the visibility type of the navigation menu of mds-header-bar"all" \| "desktop" \| "mobile" \| "none"'desktop'
thresholdthresholdSets the threshold margin to trigger hide or show status of the mds-header-bar when the page is scrollednumber1
visibilityvisibilitySets the visibility type of the navigation menu of mds-header-bar"hidden" \| "visible" \| undefined'visible'

Events

EventDescriptionType
mdsHeaderCloseEmits when the component is closedCustomEvent<MdsHeaderEventDetail>
mdsHeaderVisibilityChangeEmits when the component mds-header-bar is shown or hiddenCustomEvent<MdsHeaderVisibilityEventDetail>

Methods

setOpened(isOpened?: boolean) => Promise<void>

Parameters

NameTypeDescription
isOpenedboolean

Returns

Type: Promise<void>

Slots

SlotDescription
"default"Add mds-header-bar element/s.
"menu"Put actions and other contents that will be shown as mobile menu. Add text string, HTML elements or components to this slot.

Shadow Parts

PartDescription
"menu"The container element of the modal

CSS Custom Properties

NameDescription
--mds-header-backdrop-background-imageSets the background-image of the backdrop element visibile when the component attribute appearance is set to inline, by default is shown when mds-pref-consumtion is set to medium
--mds-header-backdrop-filterSets the backdrop-filter of the backdrop element visibile when the component attribute appearance is set to inline, by default is shown when mds-pref-consumtion is set to high
--mds-header-backdrop-heightSets the height of the backdrop element visibile when the component attribute appearance is set to inline
--mds-header-backdrop-showSets if the backdrop element is visible or not, only visible when the component attribute appearance is set to inline
--mds-header-colorSets the text color of the header and the mobile toggler icon
--mds-header-hidden-bar-translate-inlineSets translateY value for the appearance inline mds-header-bar element
--mds-header-hidden-bar-translate-stripeSets translateY value for the appearance stripe mds-header-bar element
--mds-header-icon-colorSets the color of the icon toggler
--mds-header-inline-marginSets inline margin of the mds-header-bar when attribute appearance is set to inline
--mds-header-inline-margin-mobileSets inline margin on mobile viewport of the mds-header-bar when attribute appearance is set to inline
--mds-header-z-indexSets the z-index of the modal

Dependencies

Depends on

Graph

graph TD;
  mds-header --> mds-modal
  mds-modal --> mds-button
  mds-button --> mds-spinner
  mds-button --> mds-icon
  mds-button --> mds-text
  style mds-header fill:#f9f,stroke:#333,stroke-width:4px

Built with love @ Gruppo Maggioli from R&D Department

7.3.0

9 months ago

7.1.0

11 months ago

7.6.2

8 months ago

7.6.1

8 months ago

7.6.0

8 months ago

8.1.0

7 months ago

8.1.1

6 months ago

7.0.0

12 months ago

7.4.0

9 months ago

7.2.0

11 months ago

7.5.0

8 months ago

8.0.0

8 months ago

8.2.0

5 months ago

6.7.6

1 year ago

6.7.5

1 year ago

6.7.2

1 year ago

6.7.3

1 year ago

6.7.1

1 year ago

6.7.0

1 year ago

6.6.1

2 years ago

6.6.0

2 years ago

6.5.4

2 years ago

6.5.3

2 years ago

6.5.2

2 years ago

6.5.1

2 years ago

6.5.0

2 years ago

6.3.0

2 years ago

6.4.0

2 years ago

6.2.4

2 years ago

6.2.3

2 years ago

6.2.2

2 years ago

5.6.0

2 years ago

6.1.0

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.2.1

2 years ago

6.0.3

2 years ago

6.2.0

2 years ago

6.0.2

2 years ago

5.3.0

2 years ago

5.2.0

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

4.3.2

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.1.2

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.1.1

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago