BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-extras/timeline-rail

Timeline Rail

shadcn-extras/timeline-rail
FreeComponent

Horizontal timeline with dots, labels and captions.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/timeline-rail.json

Source

timeline-rail.tsxraw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/timeline-rail.json · first 6 KB
1'use client';
2
3import * as React from 'react';
4import { cn } from '@/lib/utils';
5
6type AnchorOrButton =
7 | ({
8 href: string;
9 onClick?: never;
10 } & React.AnchorHTMLAttributes<HTMLAnchorElement>)
11 | ({
12 href?: undefined;
13 onClick?: React.MouseEventHandler<HTMLButtonElement>;
14 } & React.ButtonHTMLAttributes<HTMLButtonElement>);
15
16export type TimelineItem = {
17 /** Main small label shown near the dot (e.g., “headset”) */
18 label?: string;
19 /** Secondary label shown under the rail (e.g., “1910”) */
20 caption?: string;
21 /** Is this item emphasized (darker dot/rail before it) */
22 active?: boolean;
23} & AnchorOrButton;
24
25export type TimelineRailProps = {
26 /** Items in left→right order */
27 items: TimelineItem[];
28
29 /** Size density (dot size + vertical offsets) */
30 size?: 'sm' | 'md';
31
32 /** Visually emphasize the rail up to the last `active` item */
33 emphasizeActiveTrail?: boolean;
34
35 /** Angle for the top labels (deg). use 0 for straight text. */
36 labelAngle?: number;
37
38 /** Layout spacing between dots (Tailwind gap classes allowed). */
39 gapClassName?: string;
40
41 /** Visual customization */
42 lineColorClass?: string; // rail color
43 lineThickness?: number; // pixels
44 dotClass?: string; // dot color/class
45 dotActiveClass?: string; // active dot color/class
46
47 /** Slots for precise control */
48 className?: string; // root
49 railClassName?: string; // the line element
50 itemClassName?: string; // <li>
51 labelClassName?: string; // top tiny label
52 captionClassName?: string; // bottom caption
53
54 /** Optional renderers to fully control content */
55 renderLabel?: (item: TimelineItem, index: number) => React.ReactNode;
56 renderCaption?: (item: TimelineItem, index: number) => React.ReactNode;
57};
58
59/** SRP: purely visual timeline rail. No data fetching or state kept here. */
60export default function TimelineRail({
61 items,
62 size = 'md',
63 emphasizeActiveTrail = true,
64 labelAngle = 45,
65 gapClassName = 'gap-14',
66 lineColorClass = 'bg-zinc-300 dark:bg-zinc-700',
67 lineThickness = 6,
68 dotClass = 'bg-zinc-400 dark:bg-zinc-600',
69 dotActiveClass = 'bg-zinc-900 dark:bg-zinc-100',
70 className,
71 railClassName,
72 itemClassName,
73 labelClassName,
74 captionClassName,
75 renderLabel,
76 renderCaption,
77}: TimelineRailProps) {
78 // compute last active index (for emphasized rail)
79 const lastActive = React.useMemo(() => {
80 let idx = -1;
81 items.forEach((it, i) => {
82 if (it.active) idx = i;
83 });
84 return idx;
85 }, [items]);
86
87// … truncated

Files it writes

  • \components\core\timeline-rail.tsx

Facts

Registry
shadcn-extras
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

nayanrdeveloper.github.io NayanDevLab/shadcn-extras on GitHub Raw registry item This item as JSON

More from shadcn-extras

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Image Gridanimated-image-gridshadcn-extrasComponentsFreeno deps · 3 files
Blog Card Fourblog-card-fourshadcn-extrasComponentsFree1 dep
Blog Card Oneblog-card-oneshadcn-extrasComponentsFreeno deps
Blog Card Threeblog-card-threeshadcn-extrasComponentsFree1 dep
Blog Card Twoblog-card-twoshadcn-extrasComponentsFree1 dep
Bulb Iconbulb-iconshadcn-extrasComponentsFree2 deps
Chevron Stepschevron-stepsshadcn-extrasComponentsFreeno deps
Circular Gallerycircular-galleryshadcn-extrasComponentsFreeno deps · 3 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex