MDK Logo
UI Kitreact-devkitComponentsCoreFeedback

Spinner

Spinner component - display loading state with rotating squares

Spinner component - display loading state with rotating squares

import { Spinner } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
sizeOptionalComponentSize | undefined'md'Size variant of the spinner
colorOptional"primary" | "secondary" | undefined'primary'Color variant of the spinner
fullScreenOptionalboolean | undefinedfalseWhether to display in fullscreen mode
classNameOptionalstring | undefinedCustom className for the root element
labelOptionalstring | undefinedOptional label text to display below the spinner
speedOptional"slow" | "normal" | "fast" | undefined'normal'Speed of the animation
typeOptional"circle" | "square" | undefined'dot'Type of spinner animation

Usage

Loading indicator. Two animation styles (square and circle), three sizes, optional label and a fullscreen overlay mode.

Notes

  • Uses role="status" and aria-live="polite" for screen-reader updates.
  • Inside <Button loading>, the button automatically renders its own spinner.

Example

/** * Runnable example for Spinner. */import { Spinner } from '@tetherto/mdk-react-devkit'export const SpinnerExample = () => {  return (    <div style={{ display: 'flex', gap: 32, alignItems: 'center' }}>      <Spinner size="sm" />      <Spinner size="md" type="circle" />      <Spinner size="lg" label="Loading miners…" />    </div>  )}