Horizontal track
Milestones grouped into three fixed time horizons, with a selectable completion detail. Supply data and empty/loading states from your app.
Preview
Installation
Usage
import {
MilestoneTrackView,
type Milestone,
} from "@/components/ui/milestone-track-view";const milestones: Milestone[] = [
{
id: "keyboard",
name: "Keyboard navigation",
emoji: "",
colorHex: "#0b6e99",
horizonLabel: "This month",
horizonShort: "Now",
targetDate: null,
progress: { total: 8, completed: 4, inProgress: 2, percentage: 50 },
},
];
export function Roadmap() {
return <MilestoneTrackView milestones={milestones} />;
}Behavior and limits
- horizonShort groups "Now", "3mo" and "6mo" into Now, Next Quarter and 6 Months. Other values are omitted.
- Within each group, input order is preserved. targetDate does not determine position on the track.
- The selected milestone shows its name and completed/total counts below the track.
API reference
MilestoneTrackView
Client component with internal selection state. Exports MilestoneTrackViewProps and Milestone types.
Check the installed source for each component's className and HTML props. Vote controls do not accept arbitrary HTML props.