Spinner#

The <Spinner> component can be used to render a visual cue that something is loading.

Import#

import { Spinner } from 'bumbag'

Usage#

Editable example

Sizes#

Editable example

Colors#

Editable example

Duration#

Editable example

Track#

Editable example

Perimeter lengths#

Editable example

Progress#

You can indicate progress on your spinner by adding a value prop.

Editable example

Spinner Props#

color string

Color of the spinner.

duration string

Duration (or speed) of the spinner animation.

hasTrack boolean

Adds a background 'track' to the spinner.

trackColor string

The color of the track.

size

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

Size of the spinner.

perimeter string

Length of the spinner's perimeter as a percentage.

value number

Progress value of the spinner.

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#

Spinner.styles.base
Spinner.vector.styles.base
Spinner.loaderCircle.styles.base
Spinner.trackCircle.styles.base
Copyright © 2021 Jake Moxey