WidgetCoreWidgetCore Documentation

Progress Bar widget

The complete guide to the WidgetCore Progress Bar widget — repeater bars with label, percentage and color, the show-percentage switch, the progressbar role, CSS animation and style controls.

The Progress Bar widget shows skills, course progress or any other percentage as horizontal bars. One widget can hold several bars and the output has no JavaScript — the fill animation is pure CSS.

ItemValue
Widget namewgcr-progress
Panel titleProgress Bar
CategoryWidgetCore Widgets (wgcr)
Style / scriptwgcr-progress / —
Root class.wgcr-progress

The “Bars” section

The section holds one repeater called Bars (bars) with three fields:

FieldIDTypeDefaultNotes
LabellabelText“Skill label”The name of the skill or item; a bar with an empty label is dropped
Percentage (0 to 100)percentNumber50Clamped to 0–100 in the output
Bar colorbar_colorColorEmptyA color just for this bar; empty means the default bar color from the style

On first use you get three sample bars: “UI design” at 80%, “Front-end development” at 65% and “Student support” at 90%.

The “Settings” section

ControlIDTypeDefault
Show percentage beside the labelshow_percentSwitcherOn

HTML output

html
<div class="wgcr-progress">
  <div class="wgcr-progress-item">
    <div class="wgcr-progress-head">
      <span class="wgcr-progress-label">UI design</span>
      <span class="wgcr-progress-val">80%</span>
    </div>
    <div class="wgcr-progress-track">
      <div class="wgcr-progress-fill" role="progressbar" aria-valuemin="0" aria-valuemax="100"
           aria-valuenow="80" aria-label="UI design" style="width:80%"></div>
    </div>
  </div>
</div>
ClassPurpose
.wgcr-progressWidget root and container of all bars
.wgcr-progress-itemOne bar with its head and track
.wgcr-progress-label / .wgcr-progress-valThe label and the percentage text (when “Show percentage beside the label” is on)
.wgcr-progress-trackThe background track
.wgcr-progress-fillThe filled part with role="progressbar" and aria-valuenow

Accessibility and motion

  • Every bar has the progressbar role with aria-valuemin="0", aria-valuemax="100", aria-valuenow and an aria-label equal to its label, so screen readers announce the exact percentage.
  • The bar fills with a CSS animation (0.9s, ease-out) that scales from scaleX(0); on right-to-left pages the transform origin flips so the bar still fills from the correct side.
  • With prefers-reduced-motion: reduce the animation is disabled and the bar shows its final width without movement.

Style sections

  • Bar: “Track background”, “Default bar color”, “Bar thickness” and “Track corner radius”.
  • Label and percentage: “Label color”, “Percentage color” and both typographies.
  • General: “Gap between bars”.

Custom style example

css
/* Thinner bars with fully rounded tracks */
.wgcr-progress .wgcr-progress-track { height: 6px; border-radius: 999px; }