syncfusion-javascript-timeline
Implementing Syncfusion TypeScript Timeline
When to Use This Skill
Use this skill when you need to:
- Display items in chronological or sequential order
- Visualize timelines, milestones, or event progression
- Show workflow steps or process flows
- Create status tracking displays (order tracking, project milestones, career paths)
- Arrange content in Before, After, Alternate, or Reverse alignments
- Customize timeline appearance with dots, connectors, and styles
- Handle timeline events like lifecycle and rendering callbacks
- Use horizontal or vertical orientations for timeline layout
Timeline Control Overview
The Syncfusion TypeScript Timeline control displays content items in a sequential or chronological layout. It supports:
- Multiple Alignments: Before, After, Alternate, AlternateReverse
- Orientations: Horizontal and Vertical layouts
- Rich Content: String content, templated content, or opposite content
- Customization: Dot styling, connector customization, CSS classes
- Events: Created, beforeItemRender lifecycle events
- Reverse Mode: Display items in reverse order
- Advanced Templates: Full control over item appearance
Quick Start Guide
Basic Timeline Creation
import { Timeline } from '@syncfusion/ej2-layouts';
// Create timeline items
let timeline: Timeline = new Timeline({
items: [{}, {}, {}, {}]
});
// Render to DOM element
timeline.appendTo("#timeline");
Timeline with Content
import { Timeline, TimelineItemModel } from '@syncfusion/ej2-layouts';
const items: TimelineItemModel[] = [
{ content: 'Item 1' },
{ content: 'Item 2' },
{ content: 'Item 3' }
];
let timeline: Timeline = new Timeline({
items: items,
orientation: 'Vertical'
});
timeline.appendTo("#timeline");
Core Concepts
Key Properties
items- Array of TimelineItemModel objects defining timeline itemsorientation- Display direction:Vertical(default) orHorizontalalign- Content alignment:Before,After,Alternate,AlternateReversereverse- Boolean to display items in reverse ordertemplate- HTML template selector for custom item renderingcssClass- Custom CSS class for styling the timeline containercreated- Event triggered when timeline rendering completesbeforeItemRender- Event triggered before each item renders
TimelineItemModel Properties
content- Main content (string or template selector)oppositeContent- Opposite-side content (string or template selector)dotCss- CSS class for dot customizationcssClass- CSS class for individual item stylingdisabled- Boolean to disable specific items
Documentation and Navigation Guide
Getting Started & Setup
📄 Read: references/getting-started.md
- Package installation and dependencies
- Development environment setup
- CSS style imports and theming
- Basic timeline creation and initialization
- First working example
Items, Content & Opposite Content
📄 Read: references/items-and-content.md
- Adding string content to items
- Using templated content with selectors
- Configuring oppositeContent property
- Disabling specific timeline items
- Custom CSS classes for items
- Dot customization with dotCss property
Alignment & Orientation Modes
📄 Read: references/alignment-and-orientation.md
- Before alignment (content positioning)
- After alignment (reversed content positioning)
- Alternate alignment (alternating arrangement)
- AlternateReverse alignment (reverse alternating)
- Vertical orientation (default, stacked vertically)
- Horizontal orientation (side-by-side layout)
- Layout combinations and use cases
Customization & Styling
📄 Read: references/customization-styling.md
- Common connector styling (all connectors)
- Individual connector styling (per-item styling)
- Dot color customization
- Dot size adjustment with CSS variables
- Dot border and outline styling
- CSS selector patterns for customization
- Advanced styling techniques
Templating & Custom Rendering
📄 Read: references/templating.md
- Template property and template selectors
- Template context (item, itemIndex)
- Advanced HTML template usage
- Dot customization within templates
- Progress line styling
- Template best practices and patterns
Events & Lifecycle Hooks
📄 Read: references/events-and-lifecycle.md
- Created event (triggered on render complete)
- beforeItemRender event (triggered before each item renders)
- TimelineRenderingEventArgs for event handling
- Using events for initialization and customization
- Event callback patterns
Reverse Layout Mode
📄 Read: references/reverse-layout.md
- Reverse property for reverse item ordering
- Use cases for reverse display
- Reverse with different alignments
- Combining reverse with orientations
Complete API Reference
📄 Read: references/api-reference.md
- Properties & Defaults - All 9 Timeline properties with types and default values
- Methods - All 7 Timeline methods (addEventListener, appendTo, dataBind, etc.)
- Events & Arguments - beforeItemRender and created events with TimelineRenderingEventArgs
- Item Configuration - All 5 TimelineItemModel properties
- Enumerations - TimelineAlign and TimelineOrientation values
- Quick Setup Example - Complete working configuration
Common Patterns
Status Tracking Timeline
Display sequential status updates with custom styling:
const status = [
{ content: 'Ordered', cssClass: 'state-completed' },
{ content: 'Shipped', cssClass: 'state-progress' },
{ content: 'Delivered' }
];
let timeline: Timeline = new Timeline({
items: status,
cssClass: 'status-timeline'
});
Dual-Content Timeline
Show main content with opposite context information:
const events = [
{ content: 'Day 1, 4:00 PM', oppositeContent: 'Check-in' },
{ content: 'Day 1, 7:00 PM', oppositeContent: 'Dinner' }
];
let timeline: Timeline = new Timeline({
items: events,
align: 'Alternate',
orientation: 'Vertical'
});
Horizontal Milestone Timeline
Display project milestones horizontally:
let timeline: Timeline = new Timeline({
items: milestones,
orientation: 'Horizontal',
align: 'Before'
});
Setup Requirements
Dependencies
@syncfusion/ej2-layouts
└── @syncfusion/ej2-base
CSS Imports
@import "@syncfusion/ej2-base/styles/fluent2.css";
@import "@syncfusion/ej2-layouts/styles/fluent2.css";
HTML Element
<div id="timeline"></div>
Ready to implement? Choose a reference guide above based on your current task, or start with Getting Started for setup instructions.
More from syncfusion/javascript-ui-controls-skills
syncfusion-javascript-gantt-chart
Implement Syncfusion Gantt Chart using JavaScript/TypeScript (Essential JS 2). Use this when working with ej2-gantt component for project scheduling, task dependencies, and timeline management. Covers full Gantt implementation including data binding, task scheduling, columns, resources, timeline configuration, WBS, resource view, critical path, baseline tracking, filtering, sorting, editing, and export functionality (Excel/PDF).
9syncfusion-javascript-maps
Guide to implementing Syncfusion Maps in TypeScript and JavaScript. Use this skill whenever the user needs to create interactive maps, add markers, visualize geographical data, work with map layers, apply color mapping, add annotations, configure legends, or handle map interactions and events. Works with TypeScript (module-based) and JavaScript (CDN/ES5).
8syncfusion-javascript-accumulation-chart
Implements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).
8syncfusion-javascript-rich-text-editor
Implements the Syncfusion Rich Text Editor and Markdown Editor using TypeScript (ej2-richtexteditor). Supports both HTML (WYSIWYG) and Markdown modes via editorMode on a single RichTextEditor class. Use this skill for toolbar setup, image/media/table handling, inline or iframe editing, AI assistant, smart editing, import/export, and all content editor scenarios.
8syncfusion-javascript-chart
Implements Syncfusion JavaScript chart controls (Line, Area, Bar, Column, Pie, Polar, Radar, Waterfall, Stock). Use when building interactive data visualizations, dashboards, or real-time charts. Covers series and axes configuration, styling, animations, exporting, and technical indicators. Works with TypeScript (webpack/modules) and JavaScript (CDN/ES5).
8syncfusion-javascript-dropdowns
Comprehensive guide for implementing Syncfusion TypeScript dropdown components including AutoComplete, ComboBox, Mention, Dropdownlist and Multiselect. Use this when building selection interfaces, data binding, filtering, cascading dropdowns, custom templates, and accessible dropdown experiences.
7