Skip to main content

CamoProgressSteps

Concept​

1. Why​

Progress steps show where you are in a multi-step process and which steps are done: a checkout, an upload wizard, onboarding (Carbon's progress indicator, Fluent patterns, Material's stepper). It is an indicator, not the wizard's content: the app swaps the content and sets the current step.

2. Shape​

Split of duties

CoreSkin (renderer)
the step model and states (complete, current, upcoming, error), horizontal or vertical layout, optional clicking on reachable steps, keys, semantics ("Step 2 of 4, current")the markers (numbers, check, error), the connectors, the labels, colors

Material mapping preview: the M3 has no stepper component; Material's guidance draws circles and lines.

  • 24 dp circles, primary for complete and current, outlineVariant for upcoming.

3. API​

Contract​

data class CamoStep(
val key: Any,
val label: String,
val description: String? = null,
val state: StepState? = null, // null: derived from `current`; Error to flag a step
val onClick: (() -> Unit)? = null, // null: not clickable
)

fun CamoProgressSteps(
steps: List<CamoStep>,
current: Int, // zero-based; earlier steps are complete
orientation: StepsOrientation = Horizontal,
label: String = "Progress",
)

State → renderer: StepsState(count, current, orientation); StepState(index, state, clickable, interaction) per step with StepSlots(label, description); the connector is ConnectorState(complete).

Tokens used​

  • colors.primary, onPrimary, outlineVariant, error
  • typography.labelLarge, bodySmall; spacing.s

Component theme​

theme.components.progress steps. Every field is nullable in the theme. The skin's defaults(theme) fills whatever isn't set (Material defaults shown). See Theme §3.10.

FieldTypeMaterial defaultWhat it's for
markerSizeDp24
connectorWidthDp2
showNumbersBooleantrueelse dots
checkIcon / errorIconIconSourcecheck / alert
colorsStepsColors(complete, current, upcoming, error, connector, text)M3 valuesevery color it uses
stringsStepsStringsEnglish"Step 2 of 4", "complete", "current", "error"

Accessibility​

  • A list named label; each step announces "Step 2 of 4, Shipping, current" (or complete, upcoming, error); clickable steps are buttons; the current step is marked selected.
  • One Tab stop across the clickable steps; Left and Right (or Up and Down when vertical) move; the state change is not a live region (the app's content change is).

4. Build steps​

  1. CamoStep, StepState, theme, state, renderer, the CamoSkin field.
  2. CamoProgressSteps, the DebugSkin renderer.
  3. Tests: derived states, an error step, clickable steps, keys, vertical, semantics.

Done when

  • The upload wizard sample's steps follow its pages.

5. Edge cases​

CaseDecided behavior
CaseDecided behavior
------
Narrow width, horizontalLabels hide except the current one; the markers stay.
Jumping aheadOnly steps with onClick are clickable; the app decides which.
RTLHorizontal order mirrors.
Changed in the M10 build (2026-11-02)
  • The renderer has one part, Step, which also draws the connector to the next step (StepItemState.last says whether there is one); StepsColors has nine roles (complete, onComplete, current, onCurrent, upcoming, error, connector, text, mutedText). The theme is StepsTheme in code (progressSteps on the component themes).
  • Horizontal steps share the width equally except the last; vertical ones use their own height. A step announces "Step 2 of 4, current" (or complete, upcoming, error); steps with a click action are buttons, and the arrow keys move between them.
  • Not built: hiding labels on narrow widths and built-in strings.
  • Optional steps (a "Optional" caption) are the step's description; say if you want a flag.

Implementation​

1. Why​

A Row or Column of steps and connectors with rememberRovingFocus over the clickable ones.

2. Shape​

3. API​

@Composable public fun CamoProgressSteps(steps: List<CamoStep>, current: Int, modifier: Modifier = Modifier,
orientation: StepsOrientation = StepsOrientation.Horizontal, label: String = "Progress")

4. Build steps​

  1. States, layout, keys, renderer.
  2. Tests: states, keys, semantics.

Done when

  • Works by touch, mouse, keyboard and screen reader on all targets.

5. Edge cases​

CaseDecided behavior
Long labelsThey wrap (vertical) or ellipsize (horizontal).
Changed in the M10 build (2026-11-02)
  • StepAt composes each step with its weight in the row; the status is derived unless CamoStep.status is set.
  • None specific.