Skip to main content

Progressbar

Visual progress indicator.

Usage

<w-progressbar value="60" max="100" label="Upload progress">
<w-slot fill><div></div></w-slot>
</w-progressbar>

Props

PropTypeDefaultDescription
valuenumber0Current value
minnumber0Minimum value
maxnumber100Maximum value
labelstring""Accessible label

Slots

SlotElementDescription
fillElementThe progress fill bar

Styling

w-progressbar {
display: block;
height: 8px;
background: #e0e0e0;
border-radius: 4px;
overflow: hidden;
}

w-progressbar w-slot[fill] {
height: 100%;
background: #0056b3;
transition: width 0.3s;
}

The fill width is automatically set as a percentage.

Accessibility

  • role="progressbar" with aria-valuenow, aria-valuemin, aria-valuemax
  • aria-label from label prop