14.0.0 • Published 5 months ago

@material/linear-progress v14.0.0

Weekly downloads
44,585
License
MIT
Repository
github
Last release
5 months ago

Linear Progress

The MDC Linear Progress component is a spec-aligned linear progress indicator component adhering to the Material Design progress & activity requirements.

Design & API Documentation

Installation

npm install @material/linear-progress

Usage

<div role="progressbar" class="mdc-linear-progress">
  <div class="mdc-linear-progress__buffering-dots"></div>
  <div class="mdc-linear-progress__buffer"></div>
  <div class="mdc-linear-progress__bar mdc-linear-progress__primary-bar">
    <span class="mdc-linear-progress__bar-inner"></span>
  </div>
  <div class="mdc-linear-progress__bar mdc-linear-progress__secondary-bar">
    <span class="mdc-linear-progress__bar-inner"></span>
  </div>
</div>

CSS Modifiers

The provided modifiers are:

ClassDescription
mdc-linear-progress--indeterminatePuts the linear progress indicator in an indeterminate state.
mdc-linear-progress--reversedReverses the direction of the linear progress indicator.
mdc-linear-progress--closedHides the linear progress indicator.

Sass Mixins

MixinDescription
mdc-linear-progress-bar-color($color)Sets the color of the progress bar
mdc-linear-progress-buffer-color($color)Sets the color of the buffer bar and dots

Using the Foundation Class

MDC Linear Progress ships with an MDCLinearProgressFoundation class that external frameworks and libraries can use to integrate the component. As with all foundation classes, an adapter object must be provided. The adapter for linear progress must provide the following functions, with correct signatures:

Method SignatureDescription
addClass(className: string) => voidAdds a class to the root element.
removeClass(className: string) => voidRemoves a class from the root element.
hasClass(className: string) => booleanReturns boolean indicating whether the root element has a given class.
getPrimaryBar() => ElementReturns the primary bar element.
getBuffer() => ElementReturns the buffer element.
setStyle(el: Element, styleProperty: string, value: string) => voidSets the inline style on the given element.

MDCLinearProgressFoundation API

MDC Linear Progress Foundation exposes the following methods:

Method SignatureDescription
setDeterminate(value: boolean) => voidToggles the component between the determinate and indeterminate state.
setProgress(value: number) => voidSets the progress bar to this value. Value should be between 0, 1.
setBuffer(value: number) => voidSets the buffer bar to this value. Value should be between 0, 1.
setReverse(value: boolean) => voidReverses the direction of the linear progress indicator.
open() => voidPuts the component in the open state.
close() => voidPuts the component in the closed state.

MDCLinearProgress API

MDC Linear Progress exposes the following methods:

Method SignatureDescription
set determinate(value: boolean) => voidToggles the component between the determinate and indeterminate state.
set progress(value: number) => voidSets the progress bar to this value. Value should be between 0, 1.
set buffer(value: number) => voidSets the buffer bar to this value. Value should be between 0, 1.
set reverse(value: boolean) => voidReverses the direction of the linear progress indicator.
open() => voidPuts the component in the open state.
close() => voidPuts the component in the closed state.
@material/data-tablemdwrapper@beezydev/linear-progressmaterial-components-web@everything-registry/sub-chunk-584@kinkajou/linear-progress@lcap-ui/linear-progress@react.material/linear-progress@o-rango/orango-material-design@robertkern/vue-material@rmwc/linear-progress@preact-material-components/linear-progress@pitaya-components/linear-progress@smui/linear-progressreact-material-stepperreact-material-web-components@mirana/materializepreact-material-componentspreact-material-components-mgr@mcwv/linear-progress@mdc-stencil/linear-progress@mhamrah/svelte-material-ui@material/mwc-linear-progress@materials-elements/site@materials-ui/core@materials-ui/site@materials-elements/core@materialr/linear-progress@material/react-linear-progresssnabbdom-material-componentstest-rsmdc@wwnds/core@wwnds/react@tylertech/forge@onecomponent/linear-progress@plonquo/ember-material-components@pmwcs/linear-progresssvelte-arcadiaember-material-componentsember-cli-mdc-linear-progressmaterial-imbamaterial-toolbox@emuanalytics/flow-rdfmyg-progress@inovex.de/elements@infinitebrahmanuniverse/nolb-_matevegatroaurelia-mdc-uiaurelia-material-ui@angular/material@angular/material-experimental@arterial/linear-progress@aurelia2-mdc-web/linear-progress@authentic/mwc-linear-progress@aurelia-mdc-web/linear-progress@types/material__linear-progress@betazuul/linear-progress@bringhub/fabric.jsclosure-react-linear-progress@codeadraas/vue3-materialcomponents-library-v1@detachhead/smui-linear-progress@dev.mohe/mwc-linear-progress@gmvdev/materials
14.0.0

2 years ago

13.0.0

3 years ago

12.0.0

3 years ago

11.0.0

3 years ago

10.0.0

3 years ago

9.0.0

3 years ago

8.0.0

3 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.0.0

4 years ago

3.2.0

5 years ago

4.0.0-canary.1

5 years ago

4.0.0-canary.0

5 years ago

4.0.0-alpha.0

5 years ago

3.1.0

5 years ago

3.1.0-alpha.0

5 years ago

3.0.0

5 years ago

3.0.0-alpha.1

5 years ago

3.0.0-alpha.0

5 years ago

2.3.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

1.0.0-1

5 years ago

1.0.0-0

5 years ago

0.43.0

5 years ago

0.41.0

5 years ago

0.40.1

6 years ago

0.40.0

6 years ago

0.39.1

6 years ago

0.39.0

6 years ago

0.38.0

6 years ago

0.35.0

6 years ago

0.34.0

6 years ago

0.33.0

6 years ago

0.30.0

6 years ago

0.29.0

6 years ago

0.28.0

6 years ago

0.27.0

6 years ago

0.25.0

6 years ago

0.24.0

6 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago