Stepper
Multi-step progress and navigation for guided flows.
Stepper composes a container and projected step components.
import { KuiStep, KuiStepper } from '@kikita-labs/ui';Bind currentIndex with a signal and describe each step with labels.
<div class="basic-stepper-example">
<kui-stepper [(currentIndex)]="currentIndex">
<kui-step label="Details" description="Project basics" />
<kui-step label="Team" description="Invite collaborators" />
<kui-step label="Review" description="Confirm settings" />
</kui-stepper>
</div>Set defaults.stepper once for the application or for a subtree. Each option resolves as local input > defaults.stepper.<option> > built-in default.
import { provideKikitaUi } from '@kikita-labs/ui';
export const appConfig: ApplicationConfig = {
providers: [
provideKikitaUi({
defaults: {
stepper: {
/* options below */
},
},
}),
],
};| Name | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | — | Component size. Takes precedence over the global defaults.size. |
| orientation | 'horizontal' | 'vertical' | — | Default orientation. |
| linear | boolean | — | Requires steps to be completed in order. |
| compact | boolean | — | Uses the compact layout. |
Set any of these on the component or an ancestor to restyle one part. Each token is optional: when it is not set, the part uses the role or scale token in the default column.
| Name | Type | Default | Description |
|---|---|---|---|
| --kui-stepper-label-color-hover | CSS custom property | --kui-color-text | Label color, hover |
| --kui-stepper-circle-focus-ring-color | CSS custom property | --kui-color-focus | Circle focus ring color |
| --kui-stepper-label-color | CSS custom property | --kui-color-text-secondary | Label color |
| --kui-stepper-description-color | CSS custom property | --kui-color-text-secondary | Description color |
| --kui-stepper-circle-color-done | CSS custom property | --kui-color-primary-on-fill | Circle color, done |
| --kui-stepper-label-color-done | CSS custom property | --kui-color-text | Label color, done |
| --kui-stepper-circle-bg-current | CSS custom property | --kui-color-surface | Circle background, current |
| --kui-stepper-label-color-current | CSS custom property | --kui-color-text | Label color, current |
| --kui-stepper-circle-bg-upcoming | CSS custom property | --kui-color-surface-elevated | Circle background, upcoming |
| --kui-stepper-circle-border-upcoming | CSS custom property | --kui-color-border-control | Circle border color, upcoming |
| --kui-stepper-circle-bg-disabled | CSS custom property | --kui-color-surface-elevated | Circle background, disabled |
| --kui-stepper-circle-border-disabled | CSS custom property | --kui-color-border | Circle border color, disabled |
| --kui-stepper-circle-color-disabled | CSS custom property | --kui-color-text-disabled | Circle color, disabled |
| --kui-stepper-label-color-disabled | CSS custom property | --kui-color-text-disabled | Label color, disabled |
| --kui-stepper-circle-color-error | CSS custom property | --kui-color-danger-on-fill | Circle color, error |
| --kui-stepper-circle-bg-compact | CSS custom property | --kui-color-border | Circle background, compact |
| Name | Type | Default | Description |
|---|---|---|---|
| --kui-stepper-gap-vertical | CSS custom property | --kui-space-3 | Gap, vertical |
| --kui-stepper-body-padding-bottom-vertical | CSS custom property | --kui-space-5 | Body padding, bottom vertical |
| --kui-stepper-circle-font-size | CSS custom property | --kui-text-sm-size | Circle font size |
| --kui-stepper-label-font-size | CSS custom property | --kui-text-sm-size | Label font size |
| --kui-stepper-description-font-size | CSS custom property | --kui-text-xs-size | Description font size |
| --kui-stepper-circle-font-size-sm | CSS custom property | --kui-text-xs-size | Circle font size, sm |
| --kui-stepper-label-font-size-sm | CSS custom property | --kui-text-xs-size | Label font size, sm |
| --kui-stepper-circle-font-size-lg | CSS custom property | --kui-text-base-size | Circle font size, lg |
| --kui-stepper-label-font-size-lg | CSS custom property | --kui-text-base-size | Label font size, lg |
| --kui-stepper-dot-size | CSS custom property | 10px | Compact dot size |
Every text the component owns (accessible names, visible words, announcements) is a typed message with an English default. Override it for the application with provideKikitaUi({ messages }), or for a subtree with provideKuiMessages.
| Name | Type | Default | Description |
|---|---|---|---|
| backToStep | KuiMessageFn<{ label: string; }> | — | Name of the button of a finished step. Default Back to step {label}. |
| goToStep | KuiMessageFn<{ label: string; }> | — | Name of the button of an upcoming step. Default Go to step {label}. |
Inputs verified against @kikita-labs/ui v2.0.0 public typings.
| Name | Type | Default | Description |
|---|---|---|---|
| [(currentIndex)] | number | 0 | Zero-based active step index. |
| orientation | 'horizontal' | 'vertical' | undefined | undefined | Step list layout direction. Falls back to defaults.stepper.orientation, then horizontal. |
| size | 'sm' | 'md' | 'lg' | undefined | undefined | Circle size and label scale. Falls back to defaults.stepper.size, then the root size, then md. |
| linear | boolean | undefined | undefined | When true, only completed steps can be clicked to go back; when false, upcoming steps can be clicked to jump forward. Falls back to defaults.stepper.linear, then true. |
| compact | boolean | undefined | undefined | Shows step circles (dots) without labels or descriptions. Falls back to defaults.stepper.compact, then false. |
| kui-step.label | string | '' | Primary step label. |
| kui-step.description | string | '' | Optional secondary line below the label. |
| kui-step.hasError | boolean | false | Marks the step as errored and disables later steps. |
| kui-step.disabled | boolean | false | Forces a step to render disabled. |
| --kui-stepper-connector-color | CSS custom property | - | Connector line colour. |
| --kui-stepper-connector-color-done | CSS custom property | - | Connector line colour after a completed step. |
| --kui-stepper-circle-size | CSS custom property | - | Step circle diameter. |
| --kui-stepper-fg-upcoming | CSS custom property | - | Foreground of an upcoming step. |
| --kui-stepper-fg-current | CSS custom property | - | Foreground of the current step. |
| --kui-stepper-fg-done | CSS custom property | - | Foreground of a completed step. |
| --kui-stepper-fg-error | CSS custom property | - | Foreground of an errored step. |
| KuiStepperOptions | interface | - | Shape of defaults.stepper: size, orientation, linear and compact. |
Stepper exposes progress state through native buttons and clear labels.
kui-stepperrendersrole="list"and eachkui-steprendersrole="listitem"; passaria-labelon the host, for exampleProgress.- The current step has
aria-current="step". - Completed steps (and upcoming steps when
linearis false) render their circle as a native button named by thestepper.backToStepandstepper.goToStepmessages; disabled steps are plain spans out of the tab order. - Connector lines are decorative (
aria-hidden="true"). - Use descriptive labels and optional descriptions for each step.
- Linear mode prevents activating upcoming steps.
- Error steps disable later steps until the flow recovers.
- Use vertical orientation when labels need more horizontal space.
Consumer-visible changes of @kikita-labs/ui 2.0 for Stepper.
- The classes are
KuiStepperandKuiStep; theComponentsuffix is gone. - Size, orientation, linear and compact defaults moved to
provideKuiDefaults({ stepper: { ... } }); the inputs are nowundefineduntil set. - The back and go-to button names come from the
stepper.backToStepandstepper.goToStepmessages. - Every colour part has a token, plus font-size, gap and dot-size geometry tokens.