Horizontal Numbered Stepper
A row of numbered markers joined by connectors, with completed steps shown as checks.
3 个框架初级
The smallest footprint of the set: a row of dots plus a single active-step line.
<!--
The tightest footprint of the set: a row of dots and one line of text. The
active dot stretches into a pill so "where am I" survives even without colour,
and each dot carries its state as sr-only text for screen readers.
-->
<nav aria-label="Progress" class="flex flex-wrap items-center gap-x-3 gap-y-2">
<ol class="flex items-center gap-2">
<li><span class="block h-2.5 w-2.5 rounded-full bg-blue-600"></span><span class="sr-only">Plan (complete)</span></li>
<li><span class="block h-2.5 w-6 rounded-full bg-blue-600" aria-current="step"></span><span class="sr-only">Build (current)</span></li>
<li><span class="block h-2.5 w-2.5 rounded-full bg-gray-300 dark:bg-gray-700"></span><span class="sr-only">Review</span></li>
<li><span class="block h-2.5 w-2.5 rounded-full bg-gray-300 dark:bg-gray-700"></span><span class="sr-only">Ship</span></li>
</ol>
<p class="text-sm font-medium text-gray-900 dark:text-gray-100">
<span class="text-gray-500 dark:text-gray-400">Step 2 of 4:</span> Build
</p>
</nav>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
steps必填 | string[] | - | 流程的有序步骤。 |
current | number | 0 | Current |
The active dot stretches into a pill so position survives without colour, and each dot carries its state as `sr-only` text. Ideal for mobile flows and carousels where a labelled row would be too heavy.