LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Components

Stepper

Also called multi-step form, wizard, or step indicator

A multi-step flow with a row of numbered steps, like Account, Profile, Done, that shows where you are and how many steps are left.

import { useState, type ReactNode } from 'react';
import { motion } from 'motion/react';

type Step = { title: string; content: ReactNode; complete: boolean };
type Props = { steps: Step[]; onFinish: () => void };

const CIRCLE =
  'flex size-8 items-center justify-center rounded-full border text-muted-foreground transition-colors duration-300 group-data-done:border-blue-600 group-data-done:bg-blue-600 group-data-done:text-white aria-[current=step]:border-2 aria-[current=step]:border-blue-600 aria-[current=step]:text-blue-600';
const LINE =
  'relative h-0.5 flex-1 bg-muted group-last:hidden before:absolute before:inset-0 before:origin-left before:scale-x-0 before:bg-blue-600 before:transition-transform before:duration-300 group-data-done:before:scale-x-100';

// Each step's content stays mounted in the parent's state, so Back keeps what was typed.
export function Stepper({ steps, onFinish }: Props) {
  const [[index, direction], setIndex] = useState<[number, number]>([0, 1]);
  const go = (next: number) => setIndex([next, next > index ? 1 : -1]);
  const last = index === steps.length - 1;

  return (
    <div className='flex w-96 flex-col gap-6 text-sm'>
      <ol className='flex items-center gap-2 *:flex *:items-center *:gap-2 *:not-last:flex-1'>
        {steps.map(({ title }, i) => (
          <li key={title} data-done={i < index || undefined} className='group'>
            <span aria-current={i === index && 'step'} className={CIRCLE}>
              {i < index ? '✓' : i + 1}
            </span>
            {title}
            <span className={LINE} />
          </li>
        ))}
      </ol>
      {/* The new step slides in from the side you're heading toward. */}
      <motion.div
        key={index}
        initial={{ x: direction * 24, opacity: 0 }}
        animate={{ x: 0, opacity: 1 }}
      >
        {steps[index]?.content}
      </motion.div>
      <div className='flex justify-between'>
        <button
          disabled={index === 0}
          onClick={() => go(index - 1)}
          className='px-4 py-2 disabled:invisible'
        >
          Back
        </button>
        <button
          disabled={!steps[index]?.complete}
          onClick={() => (last ? onFinish() : go(index + 1))}
          className='rounded-lg bg-primary px-4 py-2 text-primary-foreground disabled:opacity-50'
        >
          {last ? 'Finish' : 'Next'}
        </button>
      </div>
    </div>
  );
}
Split the signup into a 3-step stepper: Account, Profile, Done. Show numbered circles joined by a line at the top; finished steps turn into a checkmark and the connecting line fills in blue over 300ms. Next validates the current step before advancing, Back keeps what was entered, and the step content slides 24px and fades in the direction of travel over 250ms.

Paste into Layerwise or any AI coding tool.

What is Stepper?

A stepper splits a long task into a few short screens and shows a progress indicator on top: numbered circles joined by a line, with finished steps checked off, the current one highlighted, and the rest grayed out. Next and Back buttons move between steps.

Use it for tasks with a natural order that would feel overwhelming as one long form: onboarding, checkout, creating a project, connecting an integration. Three to five steps works best; with more, people start to wonder how long it will take.

Validate each step before moving on, keep what people entered when they go back, and let them click a finished step to return to it. Slide the content in the direction of travel, to the left for Next and to the right for Back, so the motion matches the indicator.

Often confused with

Tabs
Tabs let people switch between views in any order. A stepper walks them through steps in a set order and remembers which are done.
Breadcrumb
A breadcrumb shows where a page sits in a site and links back up the hierarchy. A stepper tracks progress through one task.

Related terms

All terms

Progress bar

A horizontal bar that fills from left to right to show how much of a task is done, or slides in a loop while the total is still unknown.

Tabs

A row of labels that switches between panels of related content in the same spot, showing one panel at a time.

Direction-aware transition

A transition that slides new content in from the side you are heading toward, so going forward and going back move in opposite directions.

Inline validation

Form checking that happens right next to each field as you fill it in, showing an error or a checkmark before you press Submit.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
  1. 1Account
  2. 2Profile
  3. 3Done
Emailmaya@acme.com
Password••••••••••