Timeline

Description

The Timeline component is a versatile and visually appealing way to present a sequence of events or items in chronological order. It creates a vertical list of timeline items, each with customizable content, titles, dates, and optional badges. This component is ideal for displaying project histories, personal achievements, or any series of events that benefit from a chronological presentation.

Installation

bash
sabaccui add timeline

Usage

Here's an example of how to use the Timeline component in a Storyblok block:

Preview

  • Project Kickoff

    Start

    a year ago

    Initial project meeting and scope definition.

  • Design Phase

    a year ago

    UI/UX design and prototyping.

  • Development Milestone

    Milestone

    10 months ago

    Completed core functionality.

Schema

Field NameTypeDescriptionDefault Value
itemsbloksAn array of timeline items. Only accepts components of type timelineItem.[]

Notes

  1. The Timeline component uses a nested structure, with each item represented by a timelineItem component.
  2. The component automatically adds visual elements like connecting lines and icon markers to create the timeline effect.
  3. Badge colors are dynamically applied based on the badgeColor property of each timeline item.

Best Practices

  • Use consistent date formats across all timeline items for better readability.
  • Keep content concise for each timeline item to maintain a clean, scannable layout.
  • Utilize badges to highlight important events or milestones within the timeline.
  • Consider the overall narrative when organizing timeline items to tell a coherent story.
  • For long timelines, consider implementing pagination or lazy loading to improve performance.