DwsStepper
The DwsStepper component supports creating multi-step forms or wizards.
API Reference DwsStepper API Reference DwsStepOrientation
Lays out step headers vertically instead of horizontally.
Show Code
Stepper.razor
<DwsStepper Name='StepperDemo_Orientation' Orientation='DwsLayoutOrientation.Vertical'>
<DwsStep Name='StepperDemo_Step12' Title='Step 1'><Content><p>First step.</p></Content></DwsStep>
<DwsStep Name='StepperDemo_Step13' Title='Step 2'><Content><p>Second step.</p></Content></DwsStep>
</DwsStepper>Interface-Description
| Name | Typ | Default | Description |
|---|---|---|---|
| CanSkipStep | bool | - | Read-only: whether SkipStep would skip the active step (it is Skippable and is not the last step). |
| Steps | IReadOnlyList<DwsStep> | The currently registered steps, in order. | |
| ActiveStep | DwsStep? | null | The currently active step. |
| ActiveStepIndex | int | -1 | Zero-based index of the active step. |
| IsFirstStep | bool | True when the active step is the first step. | |
| IsLastStep | bool | True when the active step is the last step. |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| IsStepReachable | bool | Whether a step can be moved to right now (always true unless Linear). | |
| NextStep | Task | Advances to the next selectable step, awaiting the current step's CanProceed gate. | |
| PreviousStep | Task | Moves to the previous selectable step (no validation gate). | |
| SkipStep | Task | Marks the current step skipped and advances without validation. Does nothing unless the active step is Skippable and another step follows. | |
| GoToStep | Task | int index, bool validateCurrent | Navigates directly to the step at the given index. |
| AddStep | void | DwsStep step | Registers a DwsStep in the stepper. |
| RemoveStep | void | DwsStep step | Unregisters a DwsStep, e.g. when it is disposed or conditionally removed. |
| Name | Typ | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | null | Child content containing one or more DwsStep elements. |
| FooterTemplate | RenderFragment<DwsStepper>? | null | Fully custom navigation footer; receives the stepper instance for calling NextStep/PreviousStep/GoToStep. |
| PreviousButtonContent | RenderFragment? | null | Custom content for the built-in Previous button. |
| NextButtonContent | RenderFragment? | null | Custom content for the built-in Next button. |
| Appearance | DwsAppearance | DwsAppearance.Filled | Visual appearance of the stepper header/content. |
| Color | DwsColor | DwsColor.Undefined | Accent color applied to the stepper and its progress bar. |
| Size | DwsSize | DwsSize.Medium | Overall stepper size. |
| Orientation | DwsLayoutOrientation | DwsLayoutOrientation.Horizontal | Lays out step headers horizontally or vertically. |
| Width | int? | null | Width in pixels applied to the stepper root. |
| MinWidth | int? | null | Minimum width in pixels applied to the stepper root. |
| MaxWidth | int? | null | Maximum width in pixels applied to the stepper root. |
| Height | int? | null | Height in pixels applied to the stepper root. |
| HeaderHeight | int? | null | Fixed height in pixels for the step header strip. |
| ClassHeader | string | string.Empty | Additional CSS class applied to the header region. |
| StyleHeader | string? | null | Additional inline style applied to the header region. |
| ClassContent | string | string.Empty | Additional CSS class applied to the content region. |
| StyleContent | string? | null | Additional inline style applied to the content region. |
| ClassFooter | string | string.Empty | Additional CSS class applied to the footer region. |
| StyleFooter | string? | null | Additional inline style applied to the footer region. |
| PreviousButtonText | string? | null | Overrides the localized default Previous button text. |
| NextButtonText | string? | null | Overrides the localized default Next button text. |
| PreviousButtonIcon | string | string.Empty | CSS icon class shown on the Previous button. |
| NextButtonIcon | string | string.Empty | CSS icon class shown on the Next button. |
| ShowProgressBar | bool | true | Shows a linear DwsProgressBar reflecting step progress. |
| ShowInvalidState | bool | true | Whether a step whose CanProceed gate refused shows that in its header - a warning icon, the error colour and ", needs attention" in its accessible name - until the gate passes. Off, a refused move leaves the header unchanged. |
| Linear | bool | false | Linear wizard: a step further ahead than the next one can only be reached (header click, End key, GoToStep) once every step before it is completed or skipped; headers that cannot be reached yet are aria-disabled. Going back is always free. Off, any step can be jumped to as long as the active step's CanProceed gate lets go. |
| HeadersClickable | bool | true | Whether a step can be switched to through its header (click, and the arrow keys of the tabs model). Off, the headers only show the progress; the footer buttons and the API still move. |
| LinkQueryParameter | string? | null | Link mode: the query parameter (?step=address) naming the initial step by its Name. Under static SSR the step headers and Previous / Next are links that set it; without it they are not rendered there. |
| Haptic | DwsHapticFeedback | Selection | The tick played when a step header is chosen (haptics switched on, phones only); the footer buttons play a light one. None turns it off. |
| Semantics | DwsStepperSemantics? | null | The markup and keyboard model of the headers. Tabs: a tab list, one Tab stop, arrow keys / Home / End switch the step, the content is a tab panel. List: an ordered list with aria-current="step" on the active step, clickable headers are buttons (each a Tab stop), no arrow keys, the content is a named group and a polite status region says the new step. Null follows HeadersClickable: Tabs while the headers can be clicked, List otherwise. |
| EnableKeyboardNavigation | bool | true | Enables Arrow/Home/End key navigation across step headers. |
| AnimationMode | DwsStepperAnimationMode | DwsStepperAnimationMode.Fade | Selects the CSS transition family applied when the active step changes. |
| AnimationSpeed | DwsAnimationSpeed | DwsAnimationSpeed.Normal | Transition duration for AnimationMode. |
| Name | Typ | Description |
|---|---|---|
| OnStepChanged | EventCallback<int> | Fired whenever the active step index changes, for any reason. |
| OnStepEnter | EventCallback<int> | Fired when a step becomes active. |
| OnStepLeave | EventCallback<int> | Fired when a step stops being active. |
| OnStepCompleted | EventCallback<int> | Fired when a step is left by moving forward (marks it completed). |
| OnCompleted | EventCallback | Fired when the last step is completed by moving forward. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Element | ElementReference | The associated web component. May be null if accessed before the component is rendered. | |
| ComponentGuid | Guid | Unique identifier for the component. | |
| TypeString | string | The name of the component type, obtained from reflection. | |
| Authorized_RegisterEnabled | bool | false | Indicates whether this component is enabled through a permission registry. |
| Authorized_RegisterSelected | bool | false | Indicates whether this component is selected in permission selection mode. |
| GetInitializedState | bool | false | Returns whether the component is initialized. |
| GetRenderModeState | DwsRenderMode | Returns the current render mode. | |
| GetComponentState | DwsComponentStateType | Returns the current component state. | |
| GetIsInteractiveState | bool | false | Returns whether the component is interactive. |
| GetIsPrerenderingState | bool | false | Returns whether the component is prerendering. |
| GetComponentLoadingState | bool | false | Returns whether the component is loading. |
| IsFormBusy | bool | false | Whether the DwsForm (or DwsFormBusyRegion) around the component is locked because its submit handler is running. The state itself is the cascaded FormBusyState (IDwsFormBusyState). |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| DebugInfo | void | Logs debug information about the component. | |
| UpdateState | void | Updates the component's state and triggers StateHasChanged. | |
| UpdateStateAsync | Task | Asynchronously updates the component's state and triggers StateHasChanged. | |
| Dispose | void | Disposes the component and releases resources. | |
| FocusAsync | ValueTask | bool containedInScrollableList | Sets focus to the component's element. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Name | string | Required unique identifier for the component within its container. | |
| Visible | bool | true | Determines if the component is visible in the UI. |
| Disabled | bool | false | Disables the form control, ensuring it doesn't participate in form submission. |
| ComponentNameSpace | string | The namespace for permission-based access control. | |
| PermissionKey | string? | null | A stable key that takes the place of Name in the generated permission namespace (Page.PermissionKey): the stored permission survives a rename, and components that share a key share one permission entry. Null: keyed by Name. Read once, when the component registers; an explicit ComponentNameSpace wins. |
| Class | string | Optional CSS class names. | |
| Style | string | Optional in-line styles. | |
| Tag | object | An optional user-defined object to store any additional data with the component. | |
| BackReference | DwsReference | A reference to the enclosing component. | |
| ID | string | The HTML ID attribute for the component. | |
| AdditionalAttributes | Dictionary<string, object> | Additional HTML attributes for the component's root element. | |
| IgnorePermissionChecks | bool | false | Bypasses all permission checks for this component. |
| IgnorePermissionSelection | bool | false | Ignore permission selection mode for this component. |
| IgnoreFormBusy | bool | false | Takes the component out of the submit lock of the DwsForm (or DwsFormBusyRegion) around it: IsFormBusy stays false for it. |
| Name | Typ | Description |
|---|---|---|
| OnInitializedCallbackStarted | EventCallback | Callback when OnInitialized starts. |
| OnInitializedCallback | EventCallback | Callback during OnInitialized. |
| OnInitializedCallbackCompleted | EventCallback | Callback when OnInitialized completes. |
| OnInitializedAsyncCallbackStarted | EventCallback | Callback when OnInitializedAsync starts. |
| OnInitializedAsyncCallback | EventCallback | Callback during OnInitializedAsync. |
| OnInitializedAsyncCallbackCompleted | EventCallback | Callback when OnInitializedAsync completes. |
| OnIsComponentLoadingChanged | EventCallback<bool> | Callback when IsComponentLoading changes. |
| OnCurrentRenderModeChanged | EventCallback<DwsRenderMode> | Callback when CurrentRenderMode changes. |
| OnComponentStateChanged | EventCallback<DwsComponentStateType> | Callback when ComponentState changes. |
Interface-Description
| Name | Typ | Default | Description |
|---|---|---|---|
| Stepper | DwsStepper? | null | Cascading parent stepper that registers this step. |
| Title | string | string.Empty | The title shown in the step header. |
| Icon | string | string.Empty | CSS icon class shown in the step header instead of the step index. |
| CompletedIcon | string | string.Empty | CSS icon class shown once the step is completed (defaults to a checkmark). |
| Content | RenderFragment? | null | Content rendered when the step is active. |
| Skippable | bool | false | When true, the step can be bypassed via SkipStep(). |
| Status | DwsStepStatus | DwsStepStatus.None | A state the page sets on the step itself: Warning or Error show an icon and a colour in the step's header and are said in its accessible name. The mark of a refused CanProceed gate wins while it shows. |
| StatusText | string? | null | What Status is about (e.g. '2 fields missing'): replaces the localized 'warning' / 'error' in the header's accessible name and is its tooltip. |
| CanProceed | Func<Task<bool>>? | null | Optional async validation gate invoked before advancing past this step. |
| Name | Typ | Description |
|---|---|---|
| OnStepEnter | EventCallback | Fired when this step becomes active. |
| OnStepLeave | EventCallback | Fired when this step stops being active. |
| OnStepCompleted | EventCallback | Fired when this step is left by moving forward. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Element | ElementReference | The associated web component. May be null if accessed before the component is rendered. | |
| ComponentGuid | Guid | Unique identifier for the component. | |
| TypeString | string | The name of the component type, obtained from reflection. | |
| Authorized_RegisterEnabled | bool | false | Indicates whether this component is enabled through a permission registry. |
| Authorized_RegisterSelected | bool | false | Indicates whether this component is selected in permission selection mode. |
| GetInitializedState | bool | false | Returns whether the component is initialized. |
| GetRenderModeState | DwsRenderMode | Returns the current render mode. | |
| GetComponentState | DwsComponentStateType | Returns the current component state. | |
| GetIsInteractiveState | bool | false | Returns whether the component is interactive. |
| GetIsPrerenderingState | bool | false | Returns whether the component is prerendering. |
| GetComponentLoadingState | bool | false | Returns whether the component is loading. |
| IsFormBusy | bool | false | Whether the DwsForm (or DwsFormBusyRegion) around the component is locked because its submit handler is running. The state itself is the cascaded FormBusyState (IDwsFormBusyState). |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| DebugInfo | void | Logs debug information about the component. | |
| UpdateState | void | Updates the component's state and triggers StateHasChanged. | |
| UpdateStateAsync | Task | Asynchronously updates the component's state and triggers StateHasChanged. | |
| Dispose | void | Disposes the component and releases resources. | |
| FocusAsync | ValueTask | bool containedInScrollableList | Sets focus to the component's element. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Name | string | Required unique identifier for the component within its container. | |
| Visible | bool | true | Determines if the component is visible in the UI. |
| Disabled | bool | false | Disables the form control, ensuring it doesn't participate in form submission. |
| ComponentNameSpace | string | The namespace for permission-based access control. | |
| PermissionKey | string? | null | A stable key that takes the place of Name in the generated permission namespace (Page.PermissionKey): the stored permission survives a rename, and components that share a key share one permission entry. Null: keyed by Name. Read once, when the component registers; an explicit ComponentNameSpace wins. |
| Class | string | Optional CSS class names. | |
| Style | string | Optional in-line styles. | |
| Tag | object | An optional user-defined object to store any additional data with the component. | |
| BackReference | DwsReference | A reference to the enclosing component. | |
| ID | string | The HTML ID attribute for the component. | |
| AdditionalAttributes | Dictionary<string, object> | Additional HTML attributes for the component's root element. | |
| IgnorePermissionChecks | bool | false | Bypasses all permission checks for this component. |
| IgnorePermissionSelection | bool | false | Ignore permission selection mode for this component. |
| IgnoreFormBusy | bool | false | Takes the component out of the submit lock of the DwsForm (or DwsFormBusyRegion) around it: IsFormBusy stays false for it. |
| Name | Typ | Description |
|---|---|---|
| OnInitializedCallbackStarted | EventCallback | Callback when OnInitialized starts. |
| OnInitializedCallback | EventCallback | Callback during OnInitialized. |
| OnInitializedCallbackCompleted | EventCallback | Callback when OnInitialized completes. |
| OnInitializedAsyncCallbackStarted | EventCallback | Callback when OnInitializedAsync starts. |
| OnInitializedAsyncCallback | EventCallback | Callback during OnInitializedAsync. |
| OnInitializedAsyncCallbackCompleted | EventCallback | Callback when OnInitializedAsync completes. |
| OnIsComponentLoadingChanged | EventCallback<bool> | Callback when IsComponentLoading changes. |
| OnCurrentRenderModeChanged | EventCallback<DwsRenderMode> | Callback when CurrentRenderMode changes. |
| OnComponentStateChanged | EventCallback<DwsComponentStateType> | Callback when ComponentState changes. |
