The color of the spinner
Spinner
Spinners provide a visual cue that an action is processing awaiting a course of change or a result.
Import#
import { Spinner } from '@chakra-ui/react'
Usage#
<Spinner />
Spinner with Color#
<Spinner color="red.500" />
Spinner with different size#
<Stack direction="row" spacing={4}><Spinner size="xs" /><Spinner size="sm" /><Spinner size="md" /><Spinner size="lg" /><Spinner size="xl" /></Stack>
Spinner with empty area color#
<Spinner thickness="4px" speed="0.65s" emptyColor="gray.200" color="blue.500" size="xl" />
Props#
color
colorDescription
Type
stringcolorScheme
colorSchemeDescription
The visual color appearance of the component
Type
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"emptyColor
emptyColorDescription
The color of the empty area in the spinner
Type
stringDefault
transparentlabel
labelDescription
For accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.
Type
stringDefault
Loading...size
sizeDescription
The size of the Spinner
Type
"xs" | "sm" | "md" | "lg" | "xl"Default
mdspeed
speedDescription
The speed of the spinner.
Type
stringDefault
0.45sthickness
thicknessDescription
The thickness of the spinner
Type
stringDefault
2pxvariant
variantDescription
The variant of the Spinner
Type
string