ProgressBar#

The <ProgressBar> component allows you to render the progress and loading state of something.

Import#

import { ProgressBar } from 'bumbag';

Usage#

Editable example

Sizes#

The progress bar comes with three preset sizes: small, medium and large.

Editable example

Colors#

You can use the color prop to add color to your progress bar.

Editable example

Max value#

By default, the max value of a progress bar is 100. But you can customize this with the maxValue prop.

Editable example

Animation#

Editable example

Accessibility#

Patterns#

  • ProgressBar has a role of progressbar
  • ProgressBar has the aria-valuenow attribute set to the current value of the progress bar.
  • ProgressBar has the aria-valuemin attribute set to the minimum value of the progress bar.
  • ProgressBar has the aria-valuemax attribute set to the maximum value of the progress bar.

References#

Props#

ProgressBar Props#

color string

Sets the color of the progress bar.

maxValue number

Sets the max value of the progress bar.

size

"default"
  | (string & {})
  | "small"
  | "medium"
  | "large"

Sets the size of the progress bar.

value number

Sets the value of the progress bar.

Inherits Box props

use

string
  | (ComponentClass<any, any> & { useProps: any; })
  | (FunctionComponent<any> & { useProps: any; })

className string

children

string
  | number
  | boolean
  | {}
  | ReactElement<any, string
  | ((props: any) => ReactElement<any, string
  | ...
  | (new (props: any) => Component<any, any, any>)>)
  | (new (props: any) => Component<...>)>
  | ReactNodeArray
  | ReactPortal
  | ((props: BoxProps) => ReactNode)

alignX "right" | "left" | "center"

alignY "top" | "bottom" | "center"

variant string

colorMode string

disabled boolean

overrides

{
  useCSSVariables?: boolean;
  altitudes?: AltitudesThemeConfig;
  borders?: BordersThemeConfig;
  borderRadii?: BorderRadiiThemeConfig;
  ... 95 more ...;
  Template?: TemplateThemeConfig;
}

elementRef ((instance: any) => void) | RefObject<any>

themeKey string

Theming#

ProgressBar.styles.base
ProgressBar.Indicator.styles.base
Copyright © 2021 Jake Moxey