Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

RouteProgress

A top fixed route-loading bar that announces status text while active.

beta

Try it

Svelte
<RouteProgress active={false} label="Loading deployments" />

Examples

Navigation

Navigation.svelte
<script lang="ts">
	import RouteProgress from '@tcpsystems/ui/foundation/RouteProgress';
	import Button from '@tcpsystems/ui/foundation/Button';
	import Stack from '@tcpsystems/ui/foundation/Stack';
	let active = $state(false);
</script>

<RouteProgress {active} label="Loading deployments" />
<Stack>
	<p>{active ? 'Loading deployments…' : 'Deployments are up to date.'}</p>
	<Button onclick={() => active = !active}>{active ? 'Finish navigation' : 'Load deployments'}</Button>
</Stack>

Active and idle

Active and idle.svelte
<script lang="ts">
	import RouteProgress from '@tcpsystems/ui/foundation/RouteProgress';
	import Button from '@tcpsystems/ui/foundation/Button';
	import Stack from '@tcpsystems/ui/foundation/Stack';
	let active = $state(true);
</script>

<RouteProgress {active} />
<Stack>
	<p>{active ? 'Opening invoice INV-2048…' : 'Invoice INV-2048 is ready.'}</p>
	<Button onclick={() => active = !active}>{active ? 'Complete request' : 'Open invoice again'}</Button>
</Stack>

API

Import
import RouteProgress from '@tcpsystems/ui/foundation/RouteProgress';
PropTypeDefault
activebooleannone
label?string'Loading page'
HookKind
.tcp-route-progressRoot class
data-activeData attribute