Figma
Star462

Spinner

A Spinner is an animation that communicates a loading state to users.

yarn add @twilio-paste/spinner - or - yarn add @twilio-paste/core
import {Spinner} from '@twilio-paste/core/spinner';

const Component = () => {
  return <Spinner decorative={false} title="Loading" />;
};

decorative RequiredRequired

Whether or not the SVG is just visual flair or adds meaning to the page. Specifically for screenreaders to know whether to read out the title or not.

Type
boolean

as

Sets the HTML element the IconWrapper renders as.

Type
keyof IntrinsicElements
Default
span

color

Sets the color of the icon.

Type
"colorText" | "colorTextBrandHighlight" | "colorTextBrandInverse" | "colorTextDecorative10" | "colorTextDecorative20" | "colorTextDecorative30" | "colorTextDecorative40" | ... 57 more ... | { ...; }
Default
currentColor

delay

Time delay in milliseconds of the animation.

Type
number

display

Sets the display of the icon.

Type
| Display | (Display | null | undefined)[] | { [x: string]: Display | undefined; [x: number]: Display | undefined }
Default
block

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
string
Default
SPINNER

size

Sets the size of the icon.

Type
"sizeIcon05" | "sizeIcon10" | "sizeIcon20" | "sizeIcon30" | "sizeIcon40" | "sizeIcon50" | "sizeIcon60" | "sizeIcon70" | "sizeIcon80" | "sizeIcon90" | "sizeIcon100" | "sizeIcon110" | ("sizeIcon05" | ... 11 more ... | null)[] | { ...; }
Default
sizeIcon30

title

The accessibility text that is read when screenreaders get to this component.

Type
string

To help us improve this site, we use tools that set cookies. The data gathered by these tools is anonymized. If you reject the use of cookies, no analytics service will be initiated.