InkUI
Components

LoadingBar

Slim animated bar for indeterminate loading or determinate progress display.

A horizontal loading bar. Two modes: indeterminate (bouncing sweep animation — for "something is happening") and determinate (shows exact percentage — for trackable progress).

Live Preview
LoadingBar · indeterminate
Waiting for server...
████████░░░░░░░░░░░░░░░░░███████
~/my-cli — node v22● running

Installation

npx inkui add loading-bar

Usage

import { LoadingBar } from './components/ui/loading-bar';
 
// Indeterminate — just animates
<LoadingBar />
 
// Determinate — shows progress
<LoadingBar value={progress} />

Examples

Indeterminate

<LoadingBar />

Determinate with controlled value

const [progress, setProgress] = useState(0);
 
useEffect(() => {
  const t = setInterval(() => setProgress(p => Math.min(p + 5, 100)), 100);
  return () => clearInterval(t);
}, []);
 
<LoadingBar value={progress} />

Fixed width

<LoadingBar value={65} width={40} />

Custom color

<LoadingBar value={80} color="#A855F7" />

Props

PropTypeDefaultDescription
valuenumberundefined0–100. Omit for indeterminate mode
widthnumberterminal widthBar width in columns
colorstringtheme primaryBar fill color
themeInkUIThemedarkThemeColor theme

On this page