Skip to main content
The Timeline.vue component is a dynamic, event-driven timeline that allows users to navigate through a sequence of events. Events are displayed in a paginated format, and users can jump to specific dates or move to newer or older events.

Features

Dynamic Event Rendering

Displays a subset of events based on pagination, allowing users to browse through a large event list efficiently.

Navigation Controls

Includes buttons to navigate between the newest, newer, older, or oldest events, providing a smooth browsing experience.

Date Selection

Allows users to jump to a specific date using a dropdown selector, enabling quick access to events from a particular day.

Customizable Appearance

Supports custom dot styles for each event, allowing for personalized and visually distinct timeline entries.

Usage

Basic Example


Props

array
default:"[]"
Array of event objects, each containing id, title, datetime, and description.
string
default:"''"
Custom CSS classes for the event dots.
number
default:"5"
Number of events displayed per page.
object
Default value: { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }. Formatting options for event dates using Date.toLocaleDateString().

Example Use Cases

Timeline with Custom Dot Style

Date-Specific Navigation


Notes

  • Pagination: Use the pageLength prop to control the number of events displayed at a time.
  • Custom Event Rendering: Leverage the default scoped slot to fully customize the display of events.
  • Dot Customization: Use the dotClasses prop to style the dots marking each event in the timeline.
For further customization, refer to the component’s source code.