Skip to content

Progress Bar

Thin page-level progress indicator for navigation and loading.

Installation

bun add @xerobi/ui
import { ProgressBar } from "@xerobi/ui/progress-bar"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

ProgressBar

PropTypeDescription
loadingbooleanStart while true, finish when it turns false.
valuenumberControlled 0-100 value. Overrides `loading` when set.

Hooks

  • useProgressBar: Drives a top-of-page loading bar. Call `start()` when navigation or a request begins and `done()` when it ends; the bar trickles toward 90% in between. Works with any router.

Search documentation

Search pages, components and blocks.