Portfolio
  • 01Home
  • 02Projects
  • 03About
  • 04Skills
  • 05Lab
  • 06Writing
  • 07Contact

© 2026 Hamza Syrage

LabView all
Arrow FieldCursorCursor SpotlightCursorGooey CursorCursorImage CompareMediaInteractive ChartDataMagnetic ButtonInteractionMarquee RevealTypographyMorphing ShapeAnimationsNested ViewsOverlaysOdometer CounterDataParticle ConstellationCanvasRipple ClickButtonsScroll RevealScrollShuffle GridLayoutStep WizardNavigationTabsNavigationTilt CardCards

UI Experiments

All Lab Entries
Navigation

Step Wizard

A directional wizard with animated height, slide transitions, and progress dots.

A step wizard guides users through a sequence with directional navigation. Content slides left or right depending on direction, the container height animates to fit each step, and progress dots glide between positions.

#Step 1: Directional wizard

A direction value (1 or -1) is set whenever you navigate, then passed into slide variants as a custom prop. AnimatePresence uses it to decide whether the incoming panel enters from the right or left.

The height is driven by useMeasure and animated with a spring, so the container smoothly resizes when content length changes between steps. Progress dots use layoutId="step-dot" so the active indicator glides between them.

The mode="popLayout" on AnimatePresence removes the exiting element from layout immediately, so the entering element doesn't wait for the exit animation to finish. This keeps transitions feeling snappy.

Create account

Set up your email and a secure password to get started.

tsx
Loading...

#Configuration

Tune the step count and spring physics.

Create account

Set up your email and a secure password to get started.

Parameters
Steps4
Spring physics
Stiffness150
Damping15
Mass1
tsx
Loading...