-
Notifications
You must be signed in to change notification settings - Fork 5
Blocks Timeline
Version: 1.0.0 Category: Design Keywords: timeline, history, events, chronology, roadmap, process, steps, milestones
The Timeline Block displays chronological events, company history, or process steps in a visual timeline format with customizable layouts and scroll animations. It consists of a parent Timeline block and child Timeline Item blocks, using WordPress Block Context to pass settings from parent to child.
Commonly used for company histories, project roadmaps, event chronologies, and multi-step processes, the Timeline block supports both vertical and horizontal orientations with configurable connector lines, markers, and scroll-triggered animations.
- Add the Block: Insert the Timeline block from the block inserter. It will appear with three default milestone items (2020, 2022, 2024).
-
Edit Content:
- Click on a Timeline Item's date field and enter a date or label (e.g., "January 2024").
- Click on the title field and type a milestone name (e.g., "Company Founded").
- Add Paragraph blocks or any other content inside the item body.
-
Add More Items:
- Select the parent Timeline block.
- Click the + (Appender) button to add a new Timeline Item.
-
Customize:
- Select the parent Timeline block.
- In the Sidebar Settings, choose Orientation (vertical or horizontal).
- Set the Content Layout to "Alternating Sides" or "Right Side Only".
- Adjust marker shape, line style, and animation settings to match your design.
Orientation
-
vertical(Default): Items stack top-to-bottom along a vertical line. -
horizontal: Items are arranged left-to-right along a horizontal line. Automatically switches to vertical on mobile devices.
Content Layout (Vertical orientation only)
-
alternating(Default): Items alternate between left and right sides of the line. -
right: All items appear on the right side of the line.
Item Spacing
- Controls the gap between timeline items.
-
Default:
2rem - Accepts
px,rem, andemunits.
Line Thickness
- Width of the connector line in pixels.
-
Default:
2 - Range: 1 -- 8
Connector Style
-
solid(Default): Continuous line. -
dashed: Evenly spaced dashes. -
dotted: Series of dots.
Marker Shape
-
circle(Default): Round marker at each item. -
square: Square marker. -
diamond: Diamond (rotated square) marker.
Marker Size
- Size of the marker in pixels.
-
Default:
16 - Range: 8 -- 48
Animate on Scroll
- Default: On
- When Enabled: Items fade in as they scroll into the viewport.
- When Disabled: All items are visible immediately on page load.
Animation Duration
- Time in milliseconds for each item's fade-in animation.
-
Default:
600 - Range: 100 -- 2000 (step: 50)
Stagger Delay
- Delay in milliseconds between each consecutive item's animation start.
-
Default:
100 - Range: 0 -- 500 (step: 25)
- A value of
0means all visible items animate simultaneously.
Accessible under the Color inspector group:
-
Line Color: Color of the connector line. Falls back to
--wp--preset--color--contrastor#e5e7eb. -
Marker Fill: Fill color of the marker. Falls back to
--wp--preset--color--primaryor#2563eb. - Marker Border: Border color of the marker. Falls back to the Marker Fill value if not set.
| Attribute | Type | Default | Description |
|---|---|---|---|
orientation |
string |
"vertical" |
Timeline direction. Enum: vertical, horizontal. |
layout |
string |
"alternating" |
Content placement in vertical mode. Enum: alternating, right. |
lineColor |
string |
"" |
Color of the connector line. |
lineThickness |
number |
2 |
Thickness of the connector line in pixels. |
connectorStyle |
string |
"solid" |
Line style. Enum: solid, dashed, dotted. |
markerStyle |
string |
"circle" |
Shape of the timeline markers. Enum: circle, square, diamond. |
markerSize |
number |
16 |
Size of the markers in pixels. |
markerColor |
string |
"" |
Fill color of the markers. |
markerBorderColor |
string |
"" |
Border color of the markers. |
itemSpacing |
string |
"2rem" |
Spacing between timeline items. |
animateOnScroll |
boolean |
true |
Whether items animate into view on scroll. |
animationDuration |
number |
600 |
Duration of the scroll animation in milliseconds. |
staggerDelay |
number |
100 |
Delay between consecutive item animations in milliseconds. |
| Attribute | Type | Default | Description |
|---|---|---|---|
date |
string |
"" |
Date label displayed on the item. |
title |
string |
"" |
Title text for the milestone or event. |
icon |
string |
"" |
Optional icon identifier for the item. |
imageId |
number |
0 |
Attachment ID of an optional image. |
imageUrl |
string |
"" |
URL of the optional image. |
imageAlt |
string |
"" |
Alt text for the optional image. |
isActive |
boolean |
false |
Whether the item is marked as active/current. |
linkUrl |
string |
"" |
Optional link URL for the item. |
linkTarget |
string |
"_self" |
Link target. Use _blank for new tab. |
customMarkerColor |
string |
"" |
Per-item override for the marker color. |
uniqueId |
string |
"" |
Unique identifier for the item. |
| Feature | Value |
|---|---|
| Anchor | Yes |
| Alignment |
wide, full
|
| HTML Editing | No |
| Spacing (margin) | Yes |
| Spacing (padding) | Yes (default control) |
| Spacing (blockGap) | Yes (default control) |
| Color (background) | Yes (default control) |
| Color (text) | Yes (default control) |
| Color (link) | Yes |
| Typography (fontSize) | Yes (default control) |
| Typography (lineHeight) | Yes (default control) |
| Typography (fontFamily) | Yes (experimental) |
| Typography (fontWeight) | Yes (experimental) |
| Border (color, radius, style, width) | Yes (all default controls) |
| Feature | Value |
|---|---|
| HTML Editing | No |
| Reusable | No |
| Spacing (padding) | Yes (default control) |
| Spacing (margin) | No |
| Color (background) | Yes (default control) |
| Color (text) | Yes (default control) |
| Color (link) | Yes |
| Typography (fontSize) | Yes (default control) |
| Typography (lineHeight) | Yes |
| Typography (fontFamily) | Yes (experimental) |
| Typography (fontWeight) | Yes (experimental) |
| Border (color, radius, style, width) | Yes (radius is default control) |
The Timeline block uses the Intersection Observer API (via view.js) to detect when items enter the viewport and trigger animations.
How it works:
- When
animateOnScrollis enabled, the CSS classdsgo-timeline--animateis added to the container. - Each Timeline Item starts hidden and transitions into view as the user scrolls.
- The
animationDurationattribute controls how long each item's transition takes (exposed as the CSS custom property--dsgo-timeline-animation-duration). - The
staggerDelayattribute offsets each item's animation start so they appear sequentially rather than all at once.
Responsive behavior: Horizontal timelines automatically revert to vertical layout on mobile devices, ensuring readability on smaller screens.
Editor behavior: Animations are not played in the block editor. All items are fully visible during editing regardless of the animateOnScroll setting.
The parent Timeline block provides the following values to child Timeline Item blocks via WordPress Block Context:
designsetgo/timeline/orientationdesignsetgo/timeline/layoutdesignsetgo/timeline/lineColordesignsetgo/timeline/markerStyledesignsetgo/timeline/markerSizedesignsetgo/timeline/markerColordesignsetgo/timeline/markerBorderColordesignsetgo/timeline/animateOnScroll
This means child items automatically inherit their parent's visual configuration without requiring duplicate settings.
The block exposes the following CSS custom properties for advanced theme integration:
| Property | Maps To | Fallback |
|---|---|---|
--dsgo-timeline-line-color |
lineColor |
--wp--preset--color--contrast or #e5e7eb
|
--dsgo-timeline-line-thickness |
lineThickness |
2px |
--dsgo-timeline-connector-style |
connectorStyle |
solid |
--dsgo-timeline-marker-size |
markerSize |
16px |
--dsgo-timeline-marker-color |
markerColor |
--wp--preset--color--primary or #2563eb
|
--dsgo-timeline-marker-border-color |
markerBorderColor |
Marker color value |
--dsgo-timeline-item-spacing |
itemSpacing |
2rem |
--dsgo-timeline-animation-duration |
animationDuration |
600ms |
Display founding milestones, growth events, and key achievements. Use the vertical alternating layout for visual balance.
Outline planned phases with dates. Mark the current phase using the isActive attribute on the relevant Timeline Item.
Present a chronological list of events. The horizontal orientation works well for shorter timelines displayed in a wide container.
Break down a workflow into numbered steps. Use the "Right Side Only" layout for a clean, linear presentation.
DO:
- Use clear, concise date labels and descriptive titles.
- Set
isActiveon the current milestone for visual emphasis. - Test horizontal timelines on mobile to verify the vertical fallback.
- Use stagger delay to create a polished sequential reveal effect.
DON'T:
- Overload individual timeline items with too much content.
- Use very long animation durations that delay content visibility.
- Set stagger delay too high with many items (total delay compounds).
- Rely solely on color to distinguish active items (consider text labels for accessibility).
Q: Can I use the horizontal layout on mobile? A: Horizontal timelines automatically switch to vertical on mobile devices for better readability.
Q: Can I override marker colors on individual items?
A: Yes. Each Timeline Item has a customMarkerColor attribute that overrides the parent's marker color.
Q: Can I add images to timeline items?
A: Yes. Each Timeline Item supports an optional image via the imageId, imageUrl, and imageAlt attributes.
Q: Can I link a timeline item to another page?
A: Yes. Use the linkUrl attribute on the Timeline Item. Set linkTarget to _blank to open in a new tab.
Q: Do scroll animations work with page caching? A: Yes. Animations are driven entirely by client-side JavaScript and CSS, so they are fully compatible with caching.
Auto-generated from
docs/blocks/TIMELINE.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Blobs
- Breadcrumbs
- Card
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Flip Card
- Form Builder
- Grid
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Next Phase
- Modal Performance Fixes
- Modal Security Audit
- Modal Security Fixes Summary
- Modal Trigger
- Pill
- Progress Bar
- Reveal
- Row
- Scroll Accordion
- Scroll Gallery
- Section
- Slider
- Table Of Contents
- Tabs
- Timeline
- Animation
- Background Video
- Block Animations
- Clickable Group
- Custom Css
- Expanding Background
- Grid Mobile Order
- Grid Span
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Text Alignment Inheritance
- Text Reveal
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Control Reorganization
- Design System
- Wordpress Block Editor Best Practices
- Color Controls Pattern
- Custom Css Filters
- Performance Css Strategy
- Width Css Strategy Implementation
- Width Layout Patterns
- Antigravity Audit
- Card Block Audit
- Claude Audit
- Comprehensive Audit
- Cursor Audit
- Scroll Accordion Stacking Notes
- Security Review 1.2.1
- 2026 02 11 Icon Search Aliases Design
- 2026 02 14 Overlay Header Design
- 2026 02 15 Deactivation Block Migrator Design