Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AIScientists Dev WorldSeed stepper ui

From Leeroopedia
Knowledge Sources
Domains Frontend, UI
Last Updated 2026-10-26 18:00 GMT

Overview

Concrete multi-step stepper UI component with horizontal/vertical orientation, context-driven step state, and keyboard navigation, provided by the WorldSeed frontend.

Description

The stepper module exports a `Stepper` component suite: `Stepper` (root with context), `StepperItem` (individual step), `StepperTrigger`, `StepperIndicator`, `StepperSeparator`, `StepperTitle`, `StepperDescription`. It uses React Context for step coordination (`StepperContext`, `StepItemContext`), supports controlled/uncontrolled values, keyboard navigation (focusNext/Prev/First/Last via trigger nodes), and custom indicators per step state (active/completed/inactive/loading). Orientation switches between horizontal and vertical layouts.

Usage

Import stepper components for multi-step workflows — e.g., the intro page phases or lobby setup flow.

Code Reference

Source Location

  • Repository: WorldSeed
  • File: frontend/src/components/reui/stepper.tsx

Signature

export function Stepper(props: StepperProps): JSX.Element;
export function StepperItem(props: StepperItemProps): JSX.Element;
export function useStepper(): StepperContextValue;

Import

import { Stepper, StepperItem, StepperTrigger, StepperIndicator } from '@/components/reui/stepper';

I/O Contract

Inputs

Name Type Required Description
defaultValue number No │ Initial active step (default 1)
value number No │ Controlled active step
onValueChange (n: number) => void No │ Change callback
orientation "vertical" No │ Layout (default horizontal)

Outputs

Name Type Description
useStepper returns StepperContextValue │ activeStep, stepsCount, focusNext/Prev/First/Last

Usage Examples

import { Stepper, StepperItem, StepperTrigger, StepperIndicator } from '@/components/reui/stepper';

<Stepper defaultValue={1}>
  <StepperItem step={1}>
    <StepperTrigger><StepperIndicator>1</StepperTrigger>
  </StepperItem>
  <StepperItem step={2}>
    <StepperTrigger><StepperIndicator>2</StepperTrigger>
  </StepperItem>
</Stepper>

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment