@hig/progress-bar

2.2.0 • Public • Published

Progress Bar

The progress bar is one kind of visual representation of content loading.

Read more about when and how to use the Progress Bar component on the website.

Getting started

Install the package

yarn add @hig/progress-bar @hig/theme-context @hig/theme-data

Import the component

import ProgressBar from '@hig/progress-bar';

Basic usage

<ProgressBar />

Styling

Use the className prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component.

ProgressBar also has a stylesheet prop that accepts a function wherein you can modify ProgressBar's styles. For instance

import ProgressBar from '@hig/progress-bar';

function YourComponent() {
  // ...
  const customStylesheet = (styles, themeData) => ({
    ...styles,
    wrapper: {
      ...styles.wrapper,
      backgroundColor: themeData["colorScheme.surface.level100"]
    }
  });

  return (
    <ProgressBar stylesheet={customStylesheet} />
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @hig/progress-bar

Weekly Downloads

5

Version

2.2.0

License

Apache-2.0

Unpacked Size

21.3 kB

Total Files

5

Last publish

Collaborators

  • hig-bot
  • nfiniteset
  • wmui51
  • staceyshk