Superform by Delta Clan
✨ ClonablesSocialResourcesSuperform Home
v2
v2
  • 🏁Getting Started
    • Introduction
    • Quick Start
  • 🫀Essentials
    • Form Container
    • Step Container
    • Navigation - Overview
      • Direct
      • Logic / Conditional
      • Hook
    • Variables
      • Form Data ($f)
      • Step Index ($s)
      • Progress Percentage ($p)
      • Scoring Variables ($v)
    • Progress Bar
    • Reset
    • Radio Groups
    • Checkbox Groups
    • Cheatsheet
  • ⚙️Global Options
    • Step Delay Controls
    • Animations
      • Step Animation
      • Step Animation Duration
      • Step Animation Ease
    • Save Data & Progress
    • Pre-fill Form
    • Prevent Content Flash
    • Debug
    • Third-party Integrations
    • Cheatsheet
  • 🎛️Input Validation & Errors
    • Validation
      • length()
      • words()
      • minmax()
      • checkbox()
      • must()
      • hook()
    • Error Management
      • Automatic Error Setup
      • Manual Error Setup
  • ⚡Reactivity
    • Update Text
    • Visibility
    • Class Toggle
    • Value
    • Set Attribute
  • 🔢Score Tracking
    • Score Setup & Calculation
    • Score Ranking
  • ⌨️Accessibility
    • Enter & Backspace Bindings (↩, ⌫)
    • Checkbox & Radio Bindings
  • 🛠️Javascript SDK
    • Intro to Superform API
    • Superform Instance
    • Cheatsheet
  • 📖Additional Resources
    • WTF is an expression ? 🆕
    • Integrations
    • Tutorials
    • Changelog
    • FAQ 🚧
    • Join Discord
Powered by GitBook
On this page

Was this helpful?

  1. Essentials

Progress Bar

Visualize form progress better with progress bars.

Setup

Attribute: sf-el = progress-bar

Where: any child div inside the Basic Form Container.

Description: Designates a div element as the progress bar for a Superform-enabled form. Styled in Webflow for design purposes, its width is dynamically adjusted by Superform to represent real-time progress through the form steps.

HTML Example

index.html
<!-- Form Container with Progress Bar -->
<div sf="myForm">
    <form>
        <!-- Progress Bar -->
        <div class="progress-container">
            <div class="progress-bar" sf-el="progress-bar"></div>
        </div>

        <!-- Step 1 -->
        <div sf-step="step1">
            <!-- Content for Step 1 -->
            <button sf-goto="next">Next</button>
        </div>

        <!-- Step 2 -->
        <div sf-step="step2">
            <!-- Content for Step 2 -->
            <button sf-goto="next">Next</button>
        </div>
    </form>
</div>
styles.css
.progress-bar {
    height: 10px;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

Webflow Example

Pro Tips

  • CSS Transitions: Apply CSS transitions on the width property for smooth visual effects.

  • Synchronization: Align progress bar animation timings with form step animations and delays for cohesive visual flow.

  • Width calculation: Superform controls the width to match the form's progress; design your progress bar in Webflow and Superform takes care of the rest.

Last updated 11 months ago

Was this helpful?

🫀