Indicator
⋯
The Indicator family implements the Breadcrumb, Step Indicator, Progress Bar, and Stepper Figma sets. All variants use semantic color roles and render in Light and Dark.
import { Breadcrumb } from "@nesra/ui/indicator";
export function ProjectBreadcrumb() { return ( <Breadcrumb.Root> <Breadcrumb.List> <Breadcrumb.Item> <Breadcrumb.Link href="/projects">Projects</Breadcrumb.Link> </Breadcrumb.Item> <Breadcrumb.Separator /> <Breadcrumb.Item> <Breadcrumb.Page>Overview</Breadcrumb.Page> </Breadcrumb.Item> </Breadcrumb.List> </Breadcrumb.Root> );}import { ProgressBar } from "@nesra/ui/indicator";
export function UploadProgress() { return <ProgressBar aria-label="Upload progress" value={65} />;}The exports are also available from @nesra/ui.
Composition
Section titled “Composition”Breadcrumb.Root└── Breadcrumb.List ├── Breadcrumb.Item │ └── Breadcrumb.Link | Breadcrumb.Page ├── Breadcrumb.Separator └── Breadcrumb.Item └── Breadcrumb.Ellipsis
Stepper└── StepperItem × NExamples
Section titled “Examples”Breadcrumb
Section titled “Breadcrumb”Basic and collapsed compositions are available in sm and md.
import { Breadcrumb, type BreadcrumbProps } from "@nesra/ui/indicator";
function BreadcrumbTrail({ collapsed = false, size,}: { collapsed?: boolean; size: BreadcrumbProps["size"];}) { return ( <Breadcrumb.Root size={size}> <Breadcrumb.List> <Breadcrumb.Item> <Breadcrumb.Link href="#home">Home</Breadcrumb.Link> </Breadcrumb.Item> <Breadcrumb.Separator /> {collapsed && ( <> <Breadcrumb.Item> <Breadcrumb.Ellipsis /> </Breadcrumb.Item> <Breadcrumb.Separator /> </> )} <Breadcrumb.Item> <Breadcrumb.Link href="#module">Module</Breadcrumb.Link> </Breadcrumb.Item> <Breadcrumb.Separator /> <Breadcrumb.Item> <Breadcrumb.Page>Module Details</Breadcrumb.Page> </Breadcrumb.Item> </Breadcrumb.List> </Breadcrumb.Root> );}
export function BreadcrumbExample() { return ( <div className="grid gap-5"> <BreadcrumbTrail size="md" /> <BreadcrumbTrail size="sm" /> <BreadcrumbTrail collapsed size="md" /> <BreadcrumbTrail collapsed size="sm" /> </div> );}Step indicator
Section titled “Step indicator”StepIndicator supports pass, active, and disabled, with labels at the top, bottom, both positions, or neither.
import { StepIndicator } from "@nesra/ui/indicator";
export function StepIndicatorExample() { return ( <div className="grid gap-8 sm:grid-cols-3"> <StepIndicator label="Complete" state="pass" /> <StepIndicator label="Current" state="active" /> <StepIndicator label="Upcoming" state="disabled" /> </div> );}Progress bar
Section titled “Progress bar”ProgressBar accepts any number and clamps it to 0–100.
import { ProgressBar } from "@nesra/ui/indicator";
export function ProgressBarExample() { return ( <div className="grid w-full max-w-md gap-5"> {[0, 25, 50, 75, 100].map((value) => ( <ProgressBar aria-label={`${value}% complete`} key={value} value={value} /> ))} </div> );}Stepper
Section titled “Stepper”Stepper composes step sequences from StepperItem parts with done, active, and inactive states. Each item can show a subtitle below its label.
import { Stepper, StepperItem } from "@nesra/ui/indicator";
function Example({ count, current }: { count: 3 | 4 | 5; current: number }) { return ( <Stepper aria-label={`${count}-step onboarding`}> {Array.from({ length: count }, (_, index) => { const step = index + 1; return ( <StepperItem key={step} state={step < current ? "done" : step === current ? "active" : "inactive"} step={step} > Step {step} </StepperItem> ); })} </Stepper> );}
export function StepperVariantsExample() { return ( <div className="grid gap-8"> <Example count={3} current={1} /> <Example count={4} current={2} /> <Example count={5} current={3} /> <Stepper aria-label="Approval progress"> <StepperItem state="active" step={1} subtitle="05 Sep 2026, 14:20"> Diajukan </StepperItem> <StepperItem state="done" step={2} subtitle="08 Sep 2026, 14:00"> Ditolak </StepperItem> </Stepper> </div> );}
export function StepperArrowExample() { const steps = [ { label: "Submitted", subtitle: "05 Sep 2026, 14:20" }, { label: "Approved", subtitle: "06 Sep 2026, 08:00" }, { label: "Partially paid", subtitle: "12 Sep 2026, 08:00" }, { label: "Paid" }, { label: "Awaiting journal entry" }, { label: "Recorded" }, ];
return ( <Stepper aria-label="Approval progress"> {steps.map(({ label, subtitle }, index) => ( <StepperItem key={label} separator="arrow" state={index < 3 ? "done" : index === 3 ? "active" : "inactive"} step={index + 1} subtitle={subtitle} > {label} </StepperItem> ))} </Stepper> );}Set separator="arrow" on each item for the arrow connector. Use subtitle for supporting text below a label. The last item hides its connector.
import { Stepper, StepperItem } from "@nesra/ui/indicator";
function Example({ count, current }: { count: 3 | 4 | 5; current: number }) { return ( <Stepper aria-label={`${count}-step onboarding`}> {Array.from({ length: count }, (_, index) => { const step = index + 1; return ( <StepperItem key={step} state={step < current ? "done" : step === current ? "active" : "inactive"} step={step} > Step {step} </StepperItem> ); })} </Stepper> );}
export function StepperVariantsExample() { return ( <div className="grid gap-8"> <Example count={3} current={1} /> <Example count={4} current={2} /> <Example count={5} current={3} /> <Stepper aria-label="Approval progress"> <StepperItem state="active" step={1} subtitle="05 Sep 2026, 14:20"> Diajukan </StepperItem> <StepperItem state="done" step={2} subtitle="08 Sep 2026, 14:00"> Ditolak </StepperItem> </Stepper> </div> );}
export function StepperArrowExample() { const steps = [ { label: "Submitted", subtitle: "05 Sep 2026, 14:20" }, { label: "Approved", subtitle: "06 Sep 2026, 08:00" }, { label: "Partially paid", subtitle: "12 Sep 2026, 08:00" }, { label: "Paid" }, { label: "Awaiting journal entry" }, { label: "Recorded" }, ];
return ( <Stepper aria-label="Approval progress"> {steps.map(({ label, subtitle }, index) => ( <StepperItem key={label} separator="arrow" state={index < 3 ? "done" : index === 3 ? "active" : "inactive"} step={index + 1} subtitle={subtitle} > {label} </StepperItem> ))} </Stepper> );}The step counts are compositions rather than separate prop values. The sequence remains horizontally scrollable when it does not fit.
Light and Dark
Section titled “Light and Dark”Indicator colors come from semantic roles, so they follow .dark or data-theme="dark" on an
ancestor.
| Part | Roles |
|---|---|
| Breadcrumb | Links text-support, hover text-body. Separators and ellipsis icon-muted. Current page text-body. Link focus shadow-nesra-focus-ring |
| Step indicator | Track categorical-neutral-border with a stroke-divider border and an action-primary-default bar |
| Step indicator icon | pass: icon-neutral. active: icon-brand-primary. disabled: icon-disabled with a text-support label |
| Progress bar | Track categorical-neutral-border; fill gradient categorical-blue-border to categorical-blue-base; value text-body |
StepperItem active |
foundation-bg-brand-solid marker with a text-on-brand number. The number is white in Light and gray-950 in Dark |
StepperItem inactive |
action-primary-disabled marker, text-tertiary number, text-support label |
StepperItem done |
foundation-bg-success-solid marker with an icon-static-white check |
| Stepper connectors | 2px stroke-border line; arrow stroke-border, or text-support after a done step |
Accessibility
Section titled “Accessibility”Breadcrumb.Rootrenders a named navigation landmark andBreadcrumb.Pagemarks the current page.Breadcrumb.Ellipsisnames the omitted portion but is not interactive. Use a menu control separately when users must open omitted destinations.ProgressBaruses Base UI progress semantics. Supply a task-specificaria-labelwhen visible context does not name it.StepIndicatorcommunicates visual state only.Stepperrenders an ordered list and the activeStepperItemsetsaria-current="step".
API reference
Section titled “API reference”Breadcrumb.Root
Section titled “Breadcrumb.Root”| Prop | Type | Default | Description |
|---|---|---|---|
size |
"sm" | "md" |
"md" |
Text size and separator spacing. |
aria-label |
string |
"Breadcrumb" |
Navigation landmark name. |
className |
string |
— | Adds or overrides classes. |
Breadcrumb.Root forwards native nav props.
Breadcrumb.List
Section titled “Breadcrumb.List”Breadcrumb.List renders an ordered list and forwards native ol props.
Breadcrumb.Item
Section titled “Breadcrumb.Item”Breadcrumb.Item renders one list item and forwards native li props.
Breadcrumb.Link
Section titled “Breadcrumb.Link”Breadcrumb.Link renders an ancestor destination and forwards native anchor props, including href.
Breadcrumb.Page
Section titled “Breadcrumb.Page”Breadcrumb.Page renders the current destination as a span, sets aria-current="page", and forwards native span props.
Breadcrumb.Separator
Section titled “Breadcrumb.Separator”Breadcrumb.Separator renders a decorative li with a right chevron by default. Its optional children replace the chevron. It forwards native li props.
Breadcrumb.Ellipsis
Section titled “Breadcrumb.Ellipsis”Breadcrumb.Ellipsis renders a non-interactive marker. Its aria-label defaults to "More breadcrumb items"; other native span props are forwarded.
StepIndicator
Section titled “StepIndicator”| Prop | Type | Default | Description |
|---|---|---|---|
label |
ReactNode |
required | Visible label. |
state |
"disabled" | "pass" | "active" |
"pass" |
Marker, text, and track treatment. |
labelPosition |
"top" | "bottom" | "both" | "none" |
"both" |
Positions where the label is rendered. |
className |
string |
— | Adds or overrides classes. |
ProgressBar
Section titled “ProgressBar”| Prop | Type | Default | Description |
|---|---|---|---|
value |
number |
required | Completion percentage, clamped to 0–100. |
showValue |
boolean |
true |
Shows the rounded percentage after the track. |
className |
string |
— | Adds or overrides classes. |
Other Base UI Progress Root props are forwarded.
Stepper
Section titled “Stepper”| Prop | Type | Default | Description |
|---|---|---|---|
aria-label |
string |
"Progress steps" |
Names the ordered list. |
className |
string |
— | Adds or overrides classes. |
Other native ordered-list props are forwarded.
StepperItem
Section titled “StepperItem”| Prop | Type | Default | Description |
|---|---|---|---|
step |
ReactNode |
required | Short marker, normally the step number. |
state |
"active" | "inactive" | "done" |
"inactive" |
Visual state and current-step announcement. |
separator |
"line" | "arrow" |
"line" |
Connector after the item. |
children |
ReactNode |
required | Visible step label. |
subtitle |
ReactNode |
— | Supporting text below the icon and label. |
className |
string |
— | Adds or overrides classes. |
Other native list-item props are forwarded.
Visual values come from the semantic color roles, typography, layout, and shape tokens.