Milestone path
Data displayA readable sequence of milestones with supplied status, details and optional actions.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/milestone-path.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes button, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/milestone-path.json https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing milestone path
Pass stable IDs and explicit complete, current or upcoming states. Supply title, description and metadata for context.
Provide onMilestoneSelect only when a milestone has a real action. Noninteractive milestones remain ordinary content.
MilestonePath composes the existing Stepper parts. The caller owns explicit states; it does not invent a separate selected-row model.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
MilestonePathProps
| Prop | Type | Required |
|---|---|---|
itemsOrdered journey. Supply at most one current milestone. | readonly Milestone[] | Yes |
title | React.ReactNode | No |
description | React.ReactNode | No |
empty | React.ReactNode | No |
statusLabels | Partial<Record<MilestoneState, React.ReactNode>> | No |
onMilestoneSelectMakes titles native buttons. Progress remains owned by the caller. | (id: string) => void | No |
Accessibility
Progress state is named in text as well as color. Buttons retain native keyboard and disabled behavior.
The ordered sequence remains meaningful with motion disabled or without an interactive action.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.