Guide users through multi-step workflows with the stepper component from David UI. Styled with Tailwind CSS, it’s ideal for forms, tutorials, or processes.
This component is perfect for form completion, checkout workflows, or multi-step tasks, by dividing the journey into distinct, manageable steps.
See David UI's stepper examples to integrate structured navigation effortlessly.
A straightforward stepper component that uses numbered circles to represent progress through a sequence of steps. Inactive steps are visually distinguished to indicate the current progress.
Step 2 Content
This is the content for step 2. Add whatever content you need here.
A stepper with icons inside the steps for added visual representation. Each step features unique graphics, offering a more engaging and informative design.
Step 2 Content
This is the content for step 2. Add whatever content you need here.
A minimalist stepper that uses small dots to indicate progress. The compact design makes it ideal for simple workflows or space-limited interfaces.
Step 2 Content
This is the content for step 2. Add whatever content you need here.
This stepper pairs each step with additional content such as a title and description, making it suitable for guiding users through detailed multi-step processes.
This is the content for step 2. Add whatever content you need here.
A customizable stepper with a unique style, including rounded edges and tailored colors, offering a modern look to fit diverse design requirements.
Step 2 Content
This is the content for step 2. Add whatever content you need here.
The Stepper component in david-ai requires JavaScript to handle the step functionality. The library provides smooth transitions and navigation behavior through data attributes.
To use the Stepper component in your project, you first need to install the david-ai
library via npm:
If you prefer, you can use the DavidAI global object instead of directly importing initStepper:
You can include david-ai via a CDN and initialize stepper functionality globally in the browser. Add the following script to your HTML file:
David AI Stepper component can be used programmatically with TypeScript support for more control and type safety:
Learn how to use David AI's Stepper component with TypeScript for multi-step navigation control. This component provides programmatic methods to navigate between steps, track progress, and configure the stepper behavior with full type safety and customization options.
The HTML structure demonstrates an accessible and interactive stepper component featuring:
Here's the complete HTML implementation:
The Stepper component provides a way to guide users through multi-step processes. It supports customizable step indicators, content elements, and navigation controls through methods like next, previous, and direct step navigation.
Interface | Property/Method | Type | Description |
---|---|---|---|
StepperConfig | stepElements | HTMLElement[] | Array of HTML elements representing the step indicators. |
StepperConfig | contentElements | HTMLElement[] | Array of HTML elements containing the content for each step. |
StepperConfig | prevButton | HTMLElement | HTML element for the 'previous' navigation button. |
StepperConfig | nextButton | HTMLElement | HTML element for the 'next' navigation button. |
StepperConfig | initialStep | number (optional) | Optional initial step number (defaults to 1 if not provided). |
IStepper | next() | void | Advances to the next step if available. |
IStepper | prev() | void | Returns to the previous step if available. |
IStepper | goToStep(step: number) | void | Jumps to a specific step number. |
IStepper | getCurrentStep() | number | Returns the current active step number. |
IStepper | destroy() | void | Destroys the Stepper instance, cleaning up event listeners and references. |