Tuimorphic

Loader

Animated loading indicators with terminal-style character displays.

Import

import { BarLoader, BlockLoader } from 'tuimorphic';

BarLoader

Horizontal progress bar with terminal-style character display. Supports both determinate and indeterminate modes.

Usage

// Indeterminate mode - animated loading
<BarLoader />
 
// Determinate mode - shows specific progress
<BarLoader progress={50} />

Props

PropTypeDefaultDescription
progressnumber-Progress value (0-100). If undefined, runs in indeterminate mode
widthnumber20Width in characters
fillCharstring'█'Character used for filled portion
emptyCharstring'░'Character used for empty portion
intervalnumber100Animation interval in milliseconds (indeterminate mode)
classNamestring-Additional CSS class names

Variants

// Determinate
<BarLoader progress={25} />
<BarLoader progress={50} />
<BarLoader progress={75} />
<BarLoader progress={100} />
 
// Custom characters
<BarLoader progress={75} fillChar="=" emptyChar="-" />
 
// Custom width
<BarLoader progress={50} width={30} />

BlockLoader

Single-character animated loader with 12 different character pattern modes.

Usage

<BlockLoader />
<BlockLoader mode={1} />

Props

PropTypeDefaultDescription
modenumber0Animation mode (0-11), each with different character patterns
intervalnumber80Animation interval in milliseconds
classNamestring-Additional CSS class names

Animation Modes

Mode 1
Mode 5
.Mode 11
Mode 3
Mode 10
ModePatternCharacters
0Braille dots (sparse)⠁⠂⠄⡀⢀⠠⠐⠈
1Braille spinner (dense)⣾⣽⣻⢿⡿⣟⣯⣷
2Box quadrant▖▘▝▗
3Vertical blocks▁▂▃▄▅▆▇█
4Horizontal blocks▉▊▋▌▍▎▏
5Arrows←↖↑↗→↘↓↙
6Box drawing┤┘┴└├┌┬┐
7Triangles◢◣◤◥
8Box corners◰◳◲◱
9Circle pie◴◷◶◵
10Circle halves◐◓◑◒
11Simple dots...

Examples

<BlockLoader mode={0} />  // Braille dots
<BlockLoader mode={5} />  // Rotating arrows
<BlockLoader mode={11} /> // Simple dots
 
// Slower animation
<BlockLoader mode={5} interval={200} />

On this page