Skip to content
Cojeev UI

Milestone path

Data display

A readable sequence of milestones with supplied status, details and optional actions.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/milestone-path.json

The 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:

Terminal
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.json

Using 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

PropTypeRequired
items

Ordered journey. Supply at most one current milestone.

readonly Milestone[]Yes
titleReact.ReactNodeNo
descriptionReact.ReactNodeNo
emptyReact.ReactNodeNo
statusLabelsPartial<Record<MilestoneState, React.ReactNode>>No
onMilestoneSelect

Makes titles native buttons. Progress remains owned by the caller.

(id: string) => voidNo

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

completecurrentupcomingdisabledemptyreduced-motion

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.