Loading
Spinners, loaders, and progress indicators
Components for indicating loading and progress states.
Prerequisites
Spinner
Circular loading indicator for inline or small loading states.
Import
import { Spinner } from '@tetherto/mdk-react-devkit/core'Props
| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
size | Optional | 'sm' | 'md' | 'lg' | 'md' | Spinner size |
color | Optional | 'primary' | 'secondary' | none | Color variant of the spinner |
type | Optional | 'circle' | 'square' | none | Type of spinner animation |
speed | Optional | 'slow' | 'normal' | 'fast' | none | Speed of the animation |
label | Optional | string | none | Optional label text displayed below the spinner |
fullScreen | Optional | boolean | false | Display in fullscreen mode |
className | Optional | string | none | Additional CSS class |
Basic usage
<Spinner />
<Spinner size="sm" />
<Spinner size="lg" />
<Spinner type="circle" speed="fast" />
<Spinner label="Loading miners..." />With content
<Button disabled>
<Spinner size="sm" /> Loading...
</Button>Styling
.mdk-spinner: Root element.mdk-spinner--{size}: Size modifier
Loader
Full-screen or section loading overlay.
Import
import { Loader } from '@tetherto/mdk-react-devkit/core'Props
| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
count | Optional | 3 | 5 | 7 | 5 | Number of dots to display |
color | Optional | 'red' | 'gray' | 'blue' | 'amber' | 'orange' | 'orange' | Color variant of the loader |
size | Optional | number | 10 | Size of each dot in pixels |
className | Optional | string | none | Additional CSS class |
Basic usage
<Loader />
<Loader color="blue" />
<Loader count={3} size={8} color="amber" />
<Loader count={7} size={12} color="red" />In a container
<div className="relative min-h-[200px]">
{isLoading && <Loader />}
{data && <DataDisplay data={data} />}
</div>Styling
.mdk-loader: Root container.mdk-loader__dot: Individual dot.mdk-loader__dot--{color}: Dot color modifier