Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Progress

    Progress bar built on the native progress element, with a label, percentage, and indeterminate mode.

    60%
    60%
    60%
    60%
    75%
    60%
    75%

    Progress

    <x-markas.progress label="Uploading" :value="60" />
    import { Progress } from "@/components/markas/Progress";
    
    <Progress label="Uploading" value={60} />
    import Progress from "@/components/markas/Progress.vue";
    
    <Progress label="Uploading" :value="60" />
    <script lang="ts">
      import Progress from "$lib/components/markas/Progress.svelte";
    </script>
    
    <div class="grid gap-5">
      <Progress label="Uploading file" value={60} />
      <Progress label="Storage used" value={3} max={4} />
      <Progress label="Preparing report" />
    </div>
    ---
    import Progress from "@/components/markas/Progress.astro";
    ---
    
    <div class="grid gap-5">
      <Progress label="Uploading file" value={60} />
      <Progress label="Storage used" value={3} max={4} />
      <Progress label="Preparing report" />
    </div>
    import { Component } from "@angular/core";
    import { Progress } from "./markas/progress.component";
    
    @Component({
      selector: "markas-example",
      imports: [Progress],
      template: `
        <div class="grid gap-5">
          <markas-progress label="Uploading file" [value]="60"></markas-progress>
          <markas-progress
            label="Storage used"
            [value]="3"
            [max]="4"
          ></markas-progress>
          <markas-progress label="Preparing report"></markas-progress>
        </div>
      `,
    })
    export default class ProgressExample {}

    Examples

    Values

    0%
    25%
    75%
    100%
    0%
    25%
    75%
    100%
    0%
    25%
    75%
    100%
    0%
    25%
    75%
    100%
    0%
    25%
    75%
    100%

    Custom max

    60%
    58%
    60%
    58%
    60%
    58%
    60%
    58%
    60%
    58%

    Without label

    Step 2 of 5: Shipping address

    9 GB of 10 GB used

    Step 2 of 5: Shipping address

    9 GB of 10 GB used

    Step 2 of 5: Shipping address

    9 GB of 10 GB used

    Step 2 of 5: Shipping address

    9 GB of 10 GB used

    Step 2 of 5: Shipping address

    9 GB of 10 GB used

    In a card

    quarterly-report.pdf 2.4 MB of 4 MB
    Preparing export This can take a few minutes.
    quarterly-report.pdf2.4 MB of 4 MB
    Preparing exportThis can take a few minutes.
    quarterly-report.pdf2.4 MB of 4 MB
    Preparing exportThis can take a few minutes.
    quarterly-report.pdf 2.4 MB of 4 MB
    Preparing export This can take a few minutes.
    quarterly-report.pdf2.4 MB of 4 MB
    Preparing exportThis can take a few minutes.

    Installation

    npx markasui@latest add progress

    Usage

    <x-markas.progress label="Uploading file" :value="60" />
    <x-markas.progress label="Storage used" :value="3" :max="4" />
    <x-markas.progress label="Preparing report" />
    import { Progress } from "@/components/markas/Progress";
    
    <Progress label="Uploading file" value={60} />
    <Progress label="Storage used" value={3} max={4} />
    <Progress label="Preparing report" />
    <script setup lang="ts">
    import Progress from "@/components/markas/Progress.vue";
    </script>
    
    <template>
      <Progress label="Uploading file" :value="60" />
      <Progress label="Storage used" :value="3" :max="4" />
      <Progress label="Preparing report" />
    </template>
    <script lang="ts">
      import Progress from "$lib/components/markas/Progress.svelte";
    </script>
    
    <Progress label="Uploading file" value={60} />
    <Progress aria-label="Preparing export" />
    ---
    import Progress from "@/components/markas/Progress.astro";
    ---
    
    <Progress label="Uploading file" value={60} />
    <Progress aria-label="Preparing export" />
    import { Component } from "@angular/core";
    import { Progress } from "./markas/progress.component";
    
    @Component({
      selector: "app-upload",
      imports: [Progress],
      template: `
        <markas-progress label="Uploading file" [value]="60" />
        <markas-progress aria-label="Preparing export" />
      `,
    })
    export class Upload {}
    • Without value, the progress is indeterminate and pulses. The animation stops under prefers-reduced-motion.
    • Without label, set aria-label so the progress has a name.
    • The percentage is rounded and clamped between 0 and 100.

    Props

    NameTypeDefaultDescription
    valuenumber | nullnullCurrent value. null makes the progress indeterminate with a pulse animation.
    maxnumber100Maximum value.
    labelstring-Label above the bar, linked with label for. The percentage shows on the right when value is set.
    idstringautoId of the progress element.

    Accessibility

    • Uses the native progress element, so the progressbar role and its value are exposed automatically.
    • The label is linked with label for. Without a label, set aria-label.
    • The indeterminate animation is turned off under prefers-reduced-motion.

    Related components

    More feedback components with the same classes in every framework.