Skip to content

BbSpinner

Indicates ongoing loading or pending operations.

import { BbSpinner } from 'bitboss-ui';

On this page

Props

NameTypeDefaultDescription
labelstring | undefined-

Accessible loading announcement. When set, the spinner is wrapped in a role="status" element containing this text rendered bb-sr-only, so screen readers announce the loading state. When omitted the markup is unchanged and the spinner is purely decorative.

Set it only when the spinner stands alone. If visible text already says what is loading, put role="status" on the container holding both and leave this unset — with both in place the wait is announced twice.

See example
ptPtMap<"root", never> | undefined-

Passthrough, object form: the same keys as the pt:* attributes without the prefix. See the pt:<part> row.

pt:rootPtValue | undefined-
sizenumber | ({ size?: any; } & string) | keyof Sizes | undefined"md"

Defines the component size. Accepted values: - A key from the provided size map (keyof T), e.g. 'sm' | 'md' | 'lg' - A custom CSS size string (e.g. '20px', '1.5rem', '2em') - A number, typically interpreted as pixels by size parsers

The keys are the icon scale, so iconDefaultSizes in the plugin config remaps them here too. Colour is not a size concern and not a prop: the spinner paints in currentColor, so colour the element around it.

See example

Changes from v2

Props removed or renamed in 3.0. If you are coming from v2, the answer is here.

  • colorremovedfails silently