Wizard
Wizards are a step-by-step user interface used to break down complex tasks into digestible pieces. The simplified layout allows the reader to more easily understand the scope of a given task and the actions needed to complete the task.
By default, steps are displayed on the left, but you can move them to the top of the component. They are in the form of circular bubbles, with a check mark indicating whether it has been processed or not. They are not numbered, but the DisplayStepNumber property can be used to add this numbering. It's also possible to customize these bubbles via the IconPrevious, IconCurrent and IconNext properties.
The order of the steps must be defined when designing the Wizard. However, it is possible to enable or disable a step via the Disabled property.
By default, the contents of all steps are hidden and displayed when the user arrives at that that step (for display performance reasons). But the DeferredLoading property property reverses this process and generates the contents of the active step only.
The Label and Summary properties display the name and a small summary of the step below or next to the bubble.
The StepTitleHiddenWhen property is used to hide this title and summary when the screen width
is reduced, for example on mobile devices. By default, the value XsAndDown
is applied
to hide this data on cell phones (< 600px).
All these areas (bubbles on the left/top and navigation buttons at the bottom) are fully customizable using the StepTemplate and ButtonTemplate properties (see the second example). You can customize button labels using the ButtonTemplate or by modifying the static properties FluentWizard.LabelButtonPrevious / LabelButtonNext / LabelButtonDone.
note: this FluentWizard is not yet fully compatible with accessibility.
Examples
Default
Intro
Get started
Begin the tasks
Disabled step
This step is disabled
-
Set budget
Identify the best price
Summary
Customized
- Intro
- Get Started
- Set budget
- Summary
Introduction
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut nisi eget dolor semper luctus vitae a nulla. Cras semper eros sed lacinia tincidunt. Mauris dignissim ullamcorper dolor, ut blandit dui ullamcorper faucibus. Interdum et malesuada fames ac ante ipsum.Edit Form
note: In order for the Wizard component to automatically validate your EditForms, you must use the 'FluentEditForm' component instead of the 'EditForm' component:
<FluentWizardStep>
<FluentEditForm>
<DataAnnotationsValidator />
</FluentEditForm>
</FluentWizardStep>
Personal Info
Address Info
-
Set budget
Identify the best price
Finish
Documentation
FluentWizard Class
Parameters
Name | Type | Default | Description |
---|---|---|---|
Border | WizardBorder | None | Display a border of the Wizard. |
ButtonTemplate | RenderFragment<int>? | Gets or sets the buttons section of the wizard. This configuration overrides the whole rendering of the bottom-right section of the Wizard, including the built-in buttons and thus provides a full control over it. Custom Wizard buttons do not trigger the component OnChange and OnFinish events. The OnChange event can be triggered using the FluentWizard.GoToStepAsync(System.Int32,System.Boolean) method from your code. | |
DisplayStepNumber | WizardStepStatus | None | Display a number on each step icon. Can be overridden by the step FluentWizardStep.DisplayStepNumber property. |
Height | string | 400px | Gets or sets the height of the wizard. |
StepperBulletSpace | string? | Gets or sets the space between two bullets (ex. 120px). | |
StepperPosition | StepperPosition | Left | Gets or sets the stepper position in the wizard (Top or Left). |
StepperSize | string? | Gets or sets the stepper width (if position is Left) or the stepper height (if position is Top). | |
Steps | RenderFragment? | Gets or sets the wizard steps. Add WizardStep tags inside this tag. | |
StepSequence | WizardStepSequence | Linear | Gets or sets the way to navigate in the Wizard Steps. Default is WizardStepSequence.Linear . |
StepTitleHiddenWhen | GridItemHidden? | XsAndDown | Hide step titles and summaries on specified sizes (you can combine several values: GridItemHidden.Sm | GridItemHidden.Xl). The default value is GridItemHidden.XsAndDown to adapt to mobile devices. |
Value | int | 0 | Gets or sets the step index of the current step. This value is bindable. |
Width | string | 100% | Gets or sets the width of the wizard. |
EventCallbacks
Name | Type | Description |
---|---|---|
OnFinish | EventCallback | Triggers when the done button is clicked. |
ValueChanged | EventCallback<int> | Triggers when the value has changed. |
Methods
Name | Parameters | Type | Description |
---|---|---|---|
FinishAsync | bool validateEditContexts | Task | Optionally validate and invoke the FluentWizard.OnFinish handler. |
GoToStepAsync | int step bool validateEditContexts | Task | Navigate to the specified step, with or without validate the current EditContexts. |
FluentWizardStep Class
Parameters
Name | Type | Default | Description |
---|---|---|---|
ChildContent | RenderFragment? | Gets or sets the content of the step. | |
DeferredLoading | bool | False | Render the Wizard Step content only when the Step is selected. |
Disabled | bool | False | Gets or sets whether the step is disabled. |
DisplayStepNumber | bool? | Display a number the step icon. By default, this is the FluentWizard.DisplayStepNumber value. | |
FluentWizard | FluentWizard | Reference to the parent FluentWizardStep.FluentWizard component.For internal use only | |
IconCurrent | Icon | Preview:
| Gets or sets the icon to display for the current/active step. By default, it is a checkmark circle. |
IconNext | Icon | Preview:
| Gets or sets the icon to display for the future/next step. By default, it is a checkmark circle. |
IconPrevious | Icon | Preview:
| Gets or sets the icon to display for the past/previous step. By default, it is a checkmark circle. |
Index | int | 0 | Gets the step index. |
Label | string | Gets or sets the label of the step. | |
StepTemplate | RenderFragment<FluentWizardStepArgs>? | Gets or sets the template of the step icon. | |
Summary | string | Gets or sets the summary of the step, to diplay near the label. |
EventCallbacks
Name | Type | Description |
---|---|---|
OnChange | EventCallback<FluentWizardStepChangeEventArgs> | The OnChange event fires before the current step has changed. The EventArgs contains a field of the targeted new step and a field to cancel the build-in action. |
Methods
Name | Parameters | Type | Description |
---|---|---|---|
ClearEditFormAndContext | void | ||
RegisterEditFormAndContext | EditForm editForm EditContext editContext | void | |
ValidateEditContexts | bool |