Timeline
ProNewA scroll-following timeline with left/right lists, pinned-rail snap scrolling, horizontal carousel, slider and image stories. Entries accept a cover, expandable description and supplied action.
Installation
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
Props
<Timeline>
| Prop | Type | Default |
|---|---|---|
| children* | React.ReactNode`TimelineItem` elements. | — |
| layout | TimelineLayoutThe existing vertical layout remains the default. Horizontal modes page on touch or by arrow keys. | "list-right" |
| markerStyle | TimelineMarker | "point" |
| label | stringHeading for the focusable horizontal scroller. | "Timeline" |
| autoScroll | numberOptional horizontal autoplay interval, in milliseconds. Pauses on hover/focus and under reduced motion. | — |
| className | string | — |
<TimelineItem>
| Prop | Type | Default |
|---|---|---|
| title* | string | — |
| meta | stringSmall line above the title, usually a date or a version. | — |
| image | { src: string; alt: string }Optional cover image for the event. | — |
| summary | stringA short description before a visitor expands the full body in `children`. | — |
| action | { label: string; href?: string; onClick?: () => void }Per-event link or consumer-supplied action. | — |
| marker | React.ReactNodeMarker content, such as an icon; `number` markers count events automatically. | — |
| as | "h2" | "h3" | "h4"Heading element for the title, to fit your page outline. | — |
| children | React.ReactNode | — |
| className | string | — |
Accessibility
- Every layout is an ordered list with real headings; choose the level with `as`.
- Horizontal tracks scroll by touch, buttons or Left/Right/Home/End; snap lists scroll by Up/Down/Page/Home/End.
- Autoplay pauses under the pointer, on focus and under reduced motion. Vertical rails and entries show at full contrast when motion is reduced.
- Expandable descriptions report `aria-expanded`, and actions are native links or buttons.