Primitives
40

StepWizard

Stepper header with the current step marked. You own the step bodies.

rendered by aura-react
rendered by aura-react
rendered by aura-vue
rendered by aura-svelte
built from aura-angular's own class helpers
  1. Install
  2. Theme
  3. Ship

Install

One package, plus the stylesheet. Nothing to configure yet.

  1. Install
  2. Theme
  3. Ship

Install

One package, plus the stylesheet. Nothing to configure yet.

  1. Install
  2. Theme
  3. Ship

Install

One package, plus the stylesheet. Nothing to configure yet.

  1. Install
  2. Theme
  3. Ship

Install

One package, plus the stylesheet. Nothing to configure yet.

Code

A recipe is a composition of primitives, not one element — so there is no single snippet to copy. Build it from the classes below, or open the primitives it is made of.
Demo.tsx
import { useState } from 'react';
import { Button, Card, Group, Stack, Typography } from '@ilomee/aura-react';
import { StepWizard, type WizardStep } from '@ilomee/aura-react';

const STEPS: (WizardStep & { body: string })[] = [
  { id: 'install', label: 'Install', body: 'One package, plus the stylesheet. Nothing to configure yet.' },
  { id: 'theme', label: 'Theme', body: 'Theme, accent, corners and density are four attributes on the root.' },
  { id: 'ship', label: 'Ship', body: 'Nothing else to set up — the classes are the API from here.' },
];

// The wizard is the header: a marker per step and which one you are on. What each step *is* —
// the panel below — belongs to the caller, which is why the recipe does not take it.
export default function Demo() {
  const [active, setActive] = useState(0);
  const step = STEPS[active]!;

  return (
    <Stack gap={4} style={{ width: '100%' }}>
      <StepWizard steps={STEPS} active={active} />
      <Card>
        <Stack gap={1}>
          <Typography variant="h3">{step.label}</Typography>
          <Typography variant="body" tone="muted">
            {step.body}
          </Typography>
        </Stack>
      </Card>
      <Group>
        <Button onClick={() => setActive((s) => Math.max(0, s - 1))} disabled={active === 0}>
          Back
        </Button>
        <Button
          variant="primary"
          onClick={() => setActive((s) => Math.min(STEPS.length - 1, s + 1))}
          disabled={active === STEPS.length - 1}
        >
          Next
        </Button>
      </Group>
    </Stack>
  );
}
Demo.vue
<StepWizard :steps="steps" :active="active">
  <p>Step body</p>
</StepWizard>

Content props take a string. For markup, use the slot of the same name.

Demo.svelte
<StepWizard {steps} {active}>
  <p>Step body</p>
</StepWizard>

Content props take a string or a snippet.

Used as aura-step-wizard.

demo.component.ts
<aura-step-wizard [steps]="steps" [active]="active">
  <p>Step body</p>
</aura-step-wizard>

Content inputs take a string or a TemplateRef.

Props

Plain markup has no props — the classes below are the whole API. The four packages do nothing more than set these same classes for you.
NameTypeDefaultNotes
renderStep(step, state, index) => ReactNodeRender a step’s insides — an icon instead of a number, a duration under the label. The <li> stays ours: it carries data-state and aria-current="step".
steps*WizardStep[]{ id, label }.
activenumber0
childrenslotReactNode
NameTypeDefaultNotes
stepslot{ step: WizardStep; state: StepState; index: number }
steps*WizardStep[]
activenumber0
defaultslotSlot
NameTypeDefaultNotes
stepslotSnippet<[WizardStep, StepState, number]>
steps*WizardStep[]
activenumber0
childrenslotSnippet
NameTypeDefaultNotes
stepTemplateTemplateRef<{ $implicit: WizardStep; state: StepState; index: number }>
steps*WizardStep[]
activenumber0
ng-contentslotcontent

Emitted classes

Every framework emits the same classes — that is what makes the four libraries look identical. You can use them directly, without any component library.

ClassRoleNotes
.aura-wizardbaseRequired. A modifier does nothing without it.
.aura-wizard__stepselement
.aura-wizard__step[data-state]element
.aura-wizard__markerelement
.aura-wizard__labelelement
.aura-wizard__bodyelement