Skip to content

Progress card

Feedback
Progress card
Progress
Upload queue

checkout.ts

100%

fetcher.ts

72%

auth.ts

38%

Upload queue with three progress rows — label/percentage header and a Progress bar per file.

card · progress
import { Card, CardHeader, CardDescription, CardTitle, CardContent } from "@/components/ui/card"
import { Stack } from "@/components/ui/stack"
import { Progress } from "@/components/ui/progress"

export function ProgressCard() {
  return (
    <Card>
      <CardHeader>
        <CardDescription className="font-mono text-[10px] tracking-[0.08em] uppercase text-text-mute">Progress</CardDescription>
        <CardTitle>Upload queue</CardTitle>
      </CardHeader>
      <CardContent>
        <Stack direction="col" gap="3">
          <Stack direction="col" gap="0">
            <Stack direction="row" justify="between" className="mb-1.5">
              <p className="text-muted-foreground font-mono text-[10px]">checkout.ts</p>
              <p className="text-muted-foreground font-mono text-[10px]">100%</p>
            </Stack>
            <Progress value={100} variant="success" />
          </Stack>
          <Stack direction="col" gap="0">
            <Stack direction="row" justify="between" className="mb-1.5">
              <p className="text-muted-foreground font-mono text-[10px]">fetcher.ts</p>
              <p className="text-muted-foreground font-mono text-[10px]">72%</p>
            </Stack>
            <Progress value={72} />
          </Stack>
          <Stack direction="col" gap="0">
            <Stack direction="row" justify="between" className="mb-1.5">
              <p className="text-muted-foreground font-mono text-[10px]">auth.ts</p>
              <p className="text-muted-foreground font-mono text-[10px]">38%</p>
            </Stack>
            <Progress value={38} variant="destructive" />
          </Stack>
        </Stack>
      </CardContent>
    </Card>
  )
}
ui26/react
<script lang="ts">
  import Card from "$lib/components/ui/card.svelte"
  import CardHeader from "$lib/components/ui/card-header.svelte"
  import CardDescription from "$lib/components/ui/card-description.svelte"
  import CardTitle from "$lib/components/ui/card-title.svelte"
  import CardContent from "$lib/components/ui/card-content.svelte"
  import Stack from "$lib/components/ui/stack.svelte"
  import Progress from "$lib/components/ui/progress.svelte"
</script>

<Card>
  <CardHeader>
    <CardDescription class="font-mono text-[10px] tracking-[0.08em] uppercase text-text-mute">Progress</CardDescription>
    <CardTitle>Upload queue</CardTitle>
  </CardHeader>
  <CardContent>
    <Stack direction="col" gap="3">
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">checkout.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">100%</p>
        </Stack>
        <Progress value={100} variant="success" />
      </Stack>
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">fetcher.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">72%</p>
        </Stack>
        <Progress value={72} />
      </Stack>
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">auth.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">38%</p>
        </Stack>
        <Progress value={38} variant="destructive" />
      </Stack>
    </Stack>
  </CardContent>
</Card>
ui26/svelte
---
import Card from "@/components/ui/card.astro"
import CardHeader from "@/components/ui/card-header.astro"
import CardDescription from "@/components/ui/card-description.astro"
import CardTitle from "@/components/ui/card-title.astro"
import CardContent from "@/components/ui/card-content.astro"
import Stack from "@/components/ui/stack.astro"
import Progress from "@/components/ui/progress.astro"
---

<Card>
  <CardHeader>
    <CardDescription class="font-mono text-[10px] tracking-[0.08em] uppercase text-text-mute">Progress</CardDescription>
    <CardTitle>Upload queue</CardTitle>
  </CardHeader>
  <CardContent>
    <Stack direction="col" gap="3">
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">checkout.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">100%</p>
        </Stack>
        <Progress value={100} variant="success" />
      </Stack>
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">fetcher.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">72%</p>
        </Stack>
        <Progress value={72} />
      </Stack>
      <Stack direction="col" gap="0">
        <Stack direction="row" justify="between" class="mb-1.5">
          <p class="text-muted-foreground font-mono text-[10px]">auth.ts</p>
          <p class="text-muted-foreground font-mono text-[10px]">38%</p>
        </Stack>
        <Progress value={38} variant="destructive" />
      </Stack>
    </Stack>
  </CardContent>
</Card>
ui26/astro
{
  "root": "card",
  "elements": {
    "card": {
      "type": "Card",
      "props": {},
      "children": [
        "header",
        "content"
      ]
    },
    "header": {
      "type": "CardHeader",
      "props": {},
      "children": [
        "label",
        "title"
      ]
    },
    "label": {
      "type": "CardDescription",
      "props": {
        "text": "Progress",
        "className": "font-mono text-[10px] tracking-[0.08em] uppercase text-text-mute"
      },
      "children": []
    },
    "title": {
      "type": "CardTitle",
      "props": {
        "text": "Upload queue"
      },
      "children": []
    },
    "content": {
      "type": "CardContent",
      "props": {},
      "children": [
        "rows"
      ]
    },
    "rows": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "3"
      },
      "children": [
        "row-1",
        "row-2",
        "row-3"
      ]
    },
    "row-1": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "0"
      },
      "children": [
        "row-1-hd",
        "row-1-bar"
      ]
    },
    "row-1-hd": {
      "type": "Stack",
      "props": {
        "direction": "row",
        "justify": "between",
        "className": "mb-1.5"
      },
      "children": [
        "row-1-name",
        "row-1-pct"
      ]
    },
    "row-1-name": {
      "type": "Text",
      "props": {
        "content": "checkout.ts",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-1-pct": {
      "type": "Text",
      "props": {
        "content": "100%",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-1-bar": {
      "type": "Progress",
      "props": {
        "value": 100,
        "variant": "success"
      },
      "children": []
    },
    "row-2": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "0"
      },
      "children": [
        "row-2-hd",
        "row-2-bar"
      ]
    },
    "row-2-hd": {
      "type": "Stack",
      "props": {
        "direction": "row",
        "justify": "between",
        "className": "mb-1.5"
      },
      "children": [
        "row-2-name",
        "row-2-pct"
      ]
    },
    "row-2-name": {
      "type": "Text",
      "props": {
        "content": "fetcher.ts",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-2-pct": {
      "type": "Text",
      "props": {
        "content": "72%",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-2-bar": {
      "type": "Progress",
      "props": {
        "value": 72
      },
      "children": []
    },
    "row-3": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "0"
      },
      "children": [
        "row-3-hd",
        "row-3-bar"
      ]
    },
    "row-3-hd": {
      "type": "Stack",
      "props": {
        "direction": "row",
        "justify": "between",
        "className": "mb-1.5"
      },
      "children": [
        "row-3-name",
        "row-3-pct"
      ]
    },
    "row-3-name": {
      "type": "Text",
      "props": {
        "content": "auth.ts",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-3-pct": {
      "type": "Text",
      "props": {
        "content": "38%",
        "mono": true,
        "muted": true,
        "className": "text-[10px]"
      },
      "children": []
    },
    "row-3-bar": {
      "type": "Progress",
      "props": {
        "value": 38,
        "variant": "destructive"
      },
      "children": []
    }
  }
}
ui26/json-render