Introducing PrimeReact v11-alpha 🎉Discover Now

Timeline

An unstyled timeline component for visualizing sequential events with full control over layout and styling.

Build fully custom timelines and event sequences with complete control over layout and styling.

15/10/2026 10:30
Ordered
15/10/2026 14:00
Processing
15/10/2026 16:15
Shipped
16/10/2026 10:00
Delivered
basic-demo

Pre-styled Versions

Choose a pre-styled library to use Timeline with ready-made designs.
For hook-based usage without components, see the Headless API.

Features#

  • Compound component API with sub-components: Root, Event, Separator, Marker, Connector, Content, Opposite
  • Five alignment modes for flexible content placement
  • Vertical and horizontal orientation support
  • Opposite-side content for metadata like dates or timestamps

Usage#

import { Timeline } from 'primereact/timeline';
<Timeline.Root>
    <Timeline.Event>
        <Timeline.Opposite></Timeline.Opposite>
        <Timeline.Separator>
            <Timeline.Marker />
            <Timeline.Connector />
        </Timeline.Separator>
        <Timeline.Content></Timeline.Content>
    </Timeline.Event>
</Timeline.Root>

Behavior#

Polymorphic Rendering#

Use as on any sub-component to change the rendered HTML element.

<Timeline.Root as="section"></Timeline.Root>
<Timeline.Content as="article"></Timeline.Content>

Default elements: Root=div, Event=div, Separator=div, Marker=div, Connector=div, Content=div, Opposite=div.

Render Function Children#

Root accepts a render function as children, providing access to the component instance.

<Timeline.Root align="alternate">{(instance) => <span>Align: {instance.props.align}</span>}</Timeline.Root>

Pass Through#

Some parts may not be visible in the preview depending on the component's current state.

Loading...
/* Select a part to see its CSS selector for custom styling */

API#

TimelineRoot#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineRootInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineRootInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineRootInstance—
The instance to pass to the component.
ptSafeRecord<TimelineRootPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineRootInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
align"top" | "bottom" | "left" | "right" | "alternate"left
Alignment of the content.
orientation"horizontal" | "vertical"vertical
Specifies the orientation, valid values are 'horizontal' and 'vertical'.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"root"
data-alignCurrent alignment value
data-orientationCurrent orientation value

Defines passthrough(pt) options of Timeline component.

labeltypedescription
rootTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.
eventTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the event's DOM element.
contentTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the content's DOM element.
oppositeTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the opposite's DOM element.
separatorTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the separator's DOM element.
markerTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the marker's DOM element.
connectorTimelineRootPassThroughType<InputHTMLAttributes<HTMLDivElement>>Used to pass attributes to the connector's DOM element.

TimelineEvent#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineEventInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineEventInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineEventInstance—
The instance to pass to the component.
ptSafeRecord<TimelineEventPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineEventInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"event"

Defines passthrough(pt) options of TimelineEvent component.

labeltypedescription
rootTimelineEventPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

TimelineSeparator#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineSeparatorInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineSeparatorInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineSeparatorInstance—
The instance to pass to the component.
ptSafeRecord<TimelineSeparatorPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineSeparatorInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"separator"

Defines passthrough(pt) options of TimelineSeparator component.

labeltypedescription
rootTimelineSeparatorPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

TimelineMarker#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineMarkerInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineMarkerInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineMarkerInstance—
The instance to pass to the component.
ptSafeRecord<TimelineMarkerPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineMarkerInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"marker"

Defines passthrough(pt) options of TimelineMarker component.

labeltypedescription
rootTimelineMarkerPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

TimelineConnector#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineConnectorInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineConnectorInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineConnectorInstance—
The instance to pass to the component.
ptSafeRecord<TimelineConnectorPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineConnectorInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"connector"

Defines passthrough(pt) options of TimelineConnector component.

labeltypedescription
rootTimelineConnectorPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

TimelineContent#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineContentInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineContentInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineContentInstance—
The instance to pass to the component.
ptSafeRecord<TimelineContentPassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineContentInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"content"

Defines passthrough(pt) options of TimelineContent component.

labeltypedescription
rootTimelineContentPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

TimelineOpposite#

NameTypeDefault
refRef<unknown>—
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: TimelineOppositeInstance) => CSSProperties)—
The style to apply to the component.
classNamestring | ((instance?: TimelineOppositeInstance) => string)—
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>—
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceTimelineOppositeInstance—
The instance to pass to the component.
ptSafeRecord<TimelineOppositePassThrough>—
The pass-through props to pass to the component.
ptOptionsPassThroughOptions—
The pass-through options to pass to the component.
unstyledboolean—
Whether the component should be rendered without classes.
dtunknown—
The design token to use for the component.
stylesStylesOptions<ComponentInstance>—
The styles to use for the component.
render(instance: TimelineOppositeInstance) => ReactNode—
The render function to render the component with instance access.
childrenany—
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any—
pt-{optionName}-*-—
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"timeline"
data-part"opposite"

Defines passthrough(pt) options of TimelineOpposite component.

labeltypedescription
rootTimelineOppositePassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

Accessibility#

Screen Reader#

Timeline uses semantic containers for event structure. Add aria-label on the root to describe the timeline purpose. Event content is read in document order.

<Timeline.Root aria-label="Order tracking timeline"></Timeline.Root>

Keyboard Support#

Not applicable. Timeline is a presentational component — keyboard interaction depends on interactive content rendered inside events.