# SbStepper A multi-step wizard component for guiding users through a sequential process. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ActiveIndex | int | 0 | Current active step index (0-based) | | Linear | bool | true | Whether steps must be completed in order | | Orientation | SbStepperOrientation | Horizontal | Stepper orientation | | ShowNavigation | bool | true | Whether to show navigation buttons | | BackText | string? | null | Text for the Back button; when null, uses localized default (e.g. "Previous") | | NextText | string? | null | Text for the Next button; when null, uses localized default | | FinishText | string? | null | Text for the Finish button; when null, uses localized default | | OptionalText | string? | null | Text for optional step label; when null, uses localized default | | Class | string? | null | Additional CSS classes | ## Events | Event | Type | Description | |-------|------|-------------| | ActiveIndexChanged | EventCallback\ | Fired when active step changes | | OnFinish | EventCallback | Fired when stepper is completed | ## Templates / Slots | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment | Step content (SbStep components) | ## SbStep Parameters Use `SbStep` inside `SbStepper` to define each step. | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Label | string | "" | Step label shown in the header | | Description | string? | null | Optional description below the label | | Optional | bool | false | When true, step is marked as optional (e.g. "Optional" label) | | Icon | RenderFragment? | null | Custom icon for the step indicator (replaces the default number); completed steps still show a checkmark | | ChildContent | RenderFragment? | null | Content shown when the step is active | ## SbStepperOrientation Enum ```csharp public enum SbStepperOrientation { Horizontal, Vertical } ``` ## CSS Classes - `sb-stepper` - Base class - `sb-stepper--horizontal` - Horizontal orientation - `sb-stepper--vertical` - Vertical orientation - `sb-stepper__steps` - Steps container - `sb-stepper__step` - Individual step - `sb-stepper__step--completed` - Completed step - `sb-stepper__step--active` - Active step - `sb-stepper__step--pending` - Pending step - `sb-stepper__step--optional` - Optional step - `sb-stepper__step-button` - Step button - `sb-stepper__step-indicator` - Step number/icon indicator - `sb-stepper__step-labels` - Step label container - `sb-stepper__step-label` - Step label text - `sb-stepper__step-description` - Step description - `sb-stepper__step-optional` - Optional text label - `sb-stepper__connector` - Connector line between steps - `sb-stepper__connector--completed` - Completed connector - `sb-stepper__content` - Content container - `sb-stepper__navigation` - Navigation buttons container - `sb-stepper__back` - Back button - `sb-stepper__next` - Next button - `sb-stepper__finish` - Finish button ## Examples ### Basic Usage ```razor Email: @email Name: @firstName @lastName @code { private int currentStep = 0; private string email, password, firstName, lastName; private async Task HandleFinish() { // Submit the form await SaveUser(); } } ``` ### With Step Descriptions Use the `Description` parameter on `SbStep` to show a subtitle under each step label. ```razor Review and submit. ``` ### Vertical Orientation ```razor Content for step 1 Content for step 2 Content for step 3 ``` ### With Optional Steps ```razor Required step content Optional step content - can be skipped Final step content ``` ### Non-Linear Navigation ```razor General settings Advanced settings Review settings ``` ### Custom Button Text ```razor Content 1 Content 2 Content 3 ``` ### Without Built-in Navigation ```razor

Step 1 content

Continue

Step 2 content

Back Continue
@code { private int step = 0; } ``` ### Checkout Flow ```razor @foreach (var item in cartItems) { @item.Name @item.Price.ToString("C") } Total: @cartTotal.ToString("C") Order ready to be placed! ```