Skip to main content

Spinner

The TkSpinner component description.

import { TkSpinner } from @takeoff-ui/react

Playground​

Preview

Generated Code

<TkSpinner
type="rounded"
variant="neutral"
size="base"
orientation="vertical"
label="Loading..."
/>
<TkSpinner
type="rounded"
variant="neutral"
size="base"
orientation="vertical"
label="Loading..."
/>
<tk-spinner
type="rounded"
variant="neutral"
size="base"
orientation="vertical"
label="Loading..."
/>

Controls

Default​

The default usage of spinner.

View Code
<TkSpinner />

Label​

Label of the spinner is defined with the label property.

View Code
<TkSpinner type="three-dots" label="Loading..." />

Variants​

Demonstrates various spinner types rounded, dots, lines, pulse, three-dots and loader available via the type property.

View Code

Sizes​

Demonstrates various spinner sizes available via the size property.

View Code
<TkSpinner size="xlarge" type="rounded" label="XL" />
<TkSpinner size="large" type="rounded" label="L" />
<TkSpinner size="base" type="rounded" label="M" />
<TkSpinner size="small" type="rounded" label="S" />

Orientation​

Provides both horizontal and vertical orientations via orientation property.

View Code
<TkSpinner orientation="horizontal" label="Horizontal" />
<TkSpinner orientation="vertical" label="Vertical" />

API​

Props​

NameTypeDefaultDescription
stringnullSets the data-testid attribute on the root container element.
stringnullSets the label of the spinner component.
"horizontal", "vertical"'vertical'Controls the orientation of the spinner component.
"base", "large", "small", "xlarge", "xsmall", "xxsmall"'base'Controls the size of the spinner component.
"dots", "lines", "loader", "logo", "pulse", "rounded", "three-dots"'rounded'Sets the style of spinner component.
"danger", "info", "neutral", "primary", "success", "warning"'neutral'Sets the color variant of spinner component.