progress-indicators
intermediate
progress
animations
loading
ui
indicators
Category · Progress Indicators Difficulty Level · Intermediate Published on · January 21, 2024

Animated Progress Indicator

Dynamic progress indicators with multiple styles, smooth animations, and real-time updates. Includes circular, linear, and step-based progress bars.

#progress #animations #loading #ui #indicators

Responsive Design

Yes

Dark Mode Support

No

lines

327

Browser Compatibility

No

Live Preview

Interact with the component without leaving the page.

400px

Overview

Dynamic progress indicators with multiple styles, smooth animations, and real-time updates. Includes circular, linear, and step-based progress bars.

How to use

  1. Copy the HTML markup into your page.
  2. Paste the CSS into your stylesheet and ensure the selectors match your markup.
  3. Paste the JavaScript and load it after the markup.
  4. Adjust spacing, colors, and text to match your design system.

Customization tips

  • Rename class names to avoid collisions with your existing CSS.
  • Replace hard-coded colors with CSS variables for theming.
  • Verify the layout at 320px, 768px, and 1024px widths.

HTML

42

lines

CSS

188

lines

JavaScript

97

lines


                <div class="progress-demo">
  <div class="progress-container">
    <div class="progress-item">
      <h3>Circular Progress</h3>
      <div class="circular-progress" data-progress="75">
        <svg class="circular-chart" viewBox="0 0 36 36">
          <path class="circle-bg" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
          <path class="circle" stroke-dasharray="75, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
          <text x="18" y="20.35" class="percentage">75%</text>
        </svg>
      </div>
    </div>

    <div class="progress-item">
      <h3>Linear Progress</h3>
      <div class="linear-progress">
        <div class="progress-bar">
          <div class="progress-fill" data-progress="65"></div>
          <span class="progress-label">65%</span>
        </div>
      </div>
    </div>

    <div class="progress-item">
      <h3>Step Progress</h3>
      <div class="step-progress">
        <div class="step active" data-step="1">1</div>
        <div class="step" data-step="2">2</div>
        <div class="step" data-step="3">3</div>
        <div class="step" data-step="4">4</div>
        <div class="progress-line"></div>
      </div>
    </div>

    <div class="progress-controls">
      <button onclick="updateProgress('circular', 25)">25%</button>
      <button onclick="updateProgress('circular', 50)">50%</button>
      <button onclick="updateProgress('circular', 75)">75%</button>
      <button onclick="updateProgress('circular', 100)">100%</button>
    </div>
  </div>
</div>

              
42lines
1590characters
HTMLLanguage

Related Code Snippets

Explore template packs

Need larger building blocks? Browse responsive landing pages and component bundles.

Open HTML Template Library ->