Svelte Progress - Bitblue

Show completion state with progress bars, labels, colors, and optional animation

Progress bars communicate how far a task or process has advanced. Export name: Progressbar.

Setup

<script lang="ts">
	import { Progressbar } from '.';
</script>

Default progress

<Progressbar progress={45} />

Colors

<script lang="ts">
	import { Progressbar } from '.';
</script>

<Progressbar progress={45} color="primary" />
<Progressbar progress={45} color="blue" />
<Progressbar progress={45} color="red" />
<Progressbar progress={45} color="green" />

Sizes

size is a height utility class (default h-2.5).

<Progressbar progress={45} size="h-1.5" />
<Progressbar progress={45} size="h-2.5" />
<Progressbar progress={45} size="h-4" />
<Progressbar progress={45} size="h-6" />

Label outside

Upload 50%
<Progressbar progress={50} labelOutside="Upload" />

Label inside

50%
<Progressbar progress={50} labelInside size="h-4" />

Animated

Pass animate to tween width changes when progress updates. Tune with tweenDuration, easing, and precision.

<script lang="ts">
	import { Progressbar, Button } from '.';
	let progress = $state(20);
</script>

<Progressbar {progress} animate labelOutside="Progress" />
<Button class="mt-3" size="sm" onclick={() => (progress = Math.min(100, progress + 10))}
	>Increase</Button
>

Props

PropTypeDefaultDescription
progressnumber | string45Completion percent
color'primary' | 'secondary' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose''primary'Bar color
sizestring'h-2.5'Track height class
labelInsidebooleanfalseShow % inside the bar
labelOutsidestring''Label above the bar (also shows %)
animatebooleanfalseTween width when progress changes
tweenDurationnumber400Animation duration (ms)
easingEasingFunctioncubicOutTween easing
precisionnumber0Decimal places for displayed %
class / classestheme slots—Slot overrides (base, bar, label, …)
...restHTMLAttributes<HTMLDivElement>—Root attributes

© 2026 Bitblue is a registered trademark. All Rights Reserved.