Progress
A labeled progress bar that shows determinate completion or an indeterminate wait.
beta
Try it
Deploying gateway 42%
<Progress label="Deploying gateway" value={42} showValue />Examples
Deployment
Deploying gateway 42%
<script lang="ts">
import Progress from '@tcpsystems/ui/foundation/Progress';
</script>
<Progress label="Deploying gateway" value={42} showValue />Start to complete
Uploaded 0 of 4 build artifacts 0%
<script lang="ts">
import Progress from '@tcpsystems/ui/foundation/Progress';
import Button from '@tcpsystems/ui/foundation/Button';
import Stack from '@tcpsystems/ui/foundation/Stack';
import Cluster from '@tcpsystems/ui/foundation/Cluster';
let uploaded = $state(0);
</script>
<Stack>
<Progress label={`Uploaded ${uploaded} of 4 build artifacts`} value={uploaded} max={4} showValue />
<Cluster>
<Button disabled={uploaded === 4} onclick={() => uploaded++}>Upload next artifact</Button>
<Button onclick={() => uploaded = 0}>Reset upload</Button>
</Cluster>
</Stack>Indeterminate and sizes
Waiting for a build runner
Uploading source 25%
Building image 50%
Checking deployment 75%
<script lang="ts">
import Progress from '@tcpsystems/ui/foundation/Progress';
import Stack from '@tcpsystems/ui/foundation/Stack';
</script>
<Stack>
<Progress label="Waiting for a build runner" />
<Progress label="Uploading source" value={25} size="sm" showValue />
<Progress label="Building image" value={50} showValue />
<Progress label="Checking deployment" value={75} size="lg" showValue />
</Stack>Tones
Artifacts cached 40%
Deployment rollout 60%
Logs indexed 80%
Health checks passed 100%
Storage quota used 85%
Failed build before interruption 35%
<script lang="ts">
import Progress from '@tcpsystems/ui/foundation/Progress';
import Stack from '@tcpsystems/ui/foundation/Stack';
</script>
<Stack>
<Progress tone="neutral" label="Artifacts cached" value={40} showValue />
<Progress tone="accent" label="Deployment rollout" value={60} showValue />
<Progress tone="info" label="Logs indexed" value={80} showValue />
<Progress tone="ok" label="Health checks passed" value={100} showValue />
<Progress tone="warn" label="Storage quota used" value={85} showValue />
<Progress tone="danger" label="Failed build before interruption" value={35} showValue />
</Stack>API
import Progress from '@tcpsystems/ui/foundation/Progress';| Prop | Type | Default |
|---|---|---|
mode? | 'bar' | 'ring' | 'bar' |
label | string | none |
value? | number | none |
max? | number | 100 |
tone? | Tone | none |
size? | Size | 'md' |
showValue? | boolean | false |
| Hook | Kind |
|---|---|
.tcp-ring | Root class |
data-size | Data attribute |
data-tone | Data attribute |