[New Component] Stepper (Wizard) with per-step validation

未关闭
#1,336 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
bootstrap, csharp
领域
frontend

调研方向

The work is a new component under blazorbootstrap/Components/Stepper/, and the issue says the existing Tabs component is the nearest reference, so read that first. Demo pages and the docs page docs/docs/05-components/stepper.mdx are the other touchpoints. Done means the must-have checklist, the demo page scenarios and the Server and WebAssembly checks all pass, which is a multi-step design effort rather than a first-timer task.

由索引模型根据 Issue 内容生成。

描述

area-forms area-stepper new component

Summary

Add a Stepper component that guides users through a multi-step process (checkout, onboarding, setup wizard) with optional per-step form validation.

Motivation

Stepper/wizard is one of the most up-voted component requests across the Blazor UI ecosystem. Blazor Bootstrap users currently build it manually on top of Tabs. The key ask is validating each step's form before moving forward.

Proposed API (draft)

<Stepper @bind-ActiveStepIndex="step" Linear="true" Orientation="Orientation.Horizontal"
         OnStepChanging="OnStepChangingAsync" OnFinish="SubmitAsync">
    <StepperStep Title="Account" IconName="IconName.Person" EditContext="accountContext">
        ...
    </StepperStep>
    <StepperStep Title="Address" Optional="true">...</StepperStep>
    @if (needsPayment)
    {
        <StepperStep Title="Payment">...</StepperStep>
    }
    <StepperStep Title="Review">...</StepperStep>
</Stepper>

Must-have features (v1)

  • Orientation (Horizontal, Vertical).
  • Step header: number (default), IconName, or HeaderTemplate; Title and Description.
  • Linear mode (cannot skip ahead) and non-linear mode (click any header).
  • Per-step EditContext: advancing validates the current step and blocks on errors.
  • OnStepChanging (async, cancellable via event args) and OnStepChanged.
  • @bind-ActiveStepIndex; methods NextAsync, PreviousAsync, GoToAsync(index), ResetAsync.
  • Step states: Completed, Active, Error, Disabled, Optional, Skippable.
  • Conditional steps: steps added/removed at runtime re-index correctly.
  • Built-in Back / Next / Finish buttons with text parameters and ActionsTemplate override; OnFinish event.

Accessibility

  • Step list rendered as an ordered list; active header has aria-current="step".
  • Step state (completed, error) announced in text, not by color only.
  • Focus moves to the step panel heading on step change.

Out of scope (later)

  • Responsive collapse of headers into "Step 2 of 5".
  • Summary/review step helper.

Acceptance criteria

  • Component in blazorbootstrap/Components/Stepper/.
  • XML docs on all public parameters, methods, and events.
  • Demo page covering: horizontal, vertical, linear, non-linear, validation per step, cancel step change, optional/skippable, conditional steps, custom headers, custom actions.
  • Verified in Server and WebAssembly demo hosts.
  • Docs page docs/docs/05-components/stepper.mdx.
  • Builds for .NET 8, 9, 10.
主要语言
HTML
星标
1.2k
派生
111
平均合并
4 分钟
30 天内合并 PR
55

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

vikramlearning/blazorbootstrap 的其他 Issue

查看 vikramlearning/blazorbootstrap 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。