components

Tailwind CSS Timeline

The timeline component presents a sequential list of events arranged in chronological order.

Class Name
Type
Description
timelineComponentContainer element.
timeline-startPartThe content inside <li> that will be at the start direction.
timeline-middlePartThe content inside <li> that will be at the middle.
timeline-endPartThe content inside <li> that will be at the end direction.
timeline-snap-iconModifierSnaps the icon to the start instead of middle.
timeline-boxModifierApplies a box style to timeline-start or timeline-end.
timeline-compactModifierForces all items on one side.
timeline-centeredModifierSets content position in grid for centered timeline at start.
timeline-shiftModifierFacilitates content adjustment on smaller screens.
timeline-verticalDirectionShows the timeline vertically.
timeline-horizontalDirectionShows the timeline horizontally.

Apply the timeline class to the <ul> element to establish the foundation for the timeline component. Within the timeline, utilize <li> elements to represent individual timeline items.

Use the component classes timeline-start, timeline-middle, or timeline-end to position elements within the timeline grid at the top, center, or end respectively.

Use <hr /> as first and last child of <li> for path of timeline.

Apply the modifier class timeline-box to give any specific timeline item a boxed style.

Utilize the provided example for crafting a horizontal timeline component.

Incorporate the responsive class timeline-vertical to create a vertical timeline component.

Use the component classes timeline-start, timeline-middle, or timeline-end to position elements within the timeline grid at the start, center, or end respectively.

The example provided showcases a basic type of timeline.

The below example showcases a type of timeline with icons.

Utilize the following examples to determine the positioning of content within the horizontal timeline component.

Use the provided example of a timeline featuring content on both sides.

Use the provided example of a timeline featuring content only on bottom.

Use the provided example of a timeline featuring content only on top.

Use the provided example of a timeline featuring content on alternate sides.

Utilize the following examples to determine the positioning of content within the vertical timeline component.

Use the provided example of a timeline featuring content on both sides.

Use the provided example of a timeline featuring content only on start.

Use the provided example of a timeline featuring content only on end.

Use the provided example of a timeline featuring content on alternate sides.

Use TailwindCSS classes for responsive design, such as sm:, md:, lg:, xl:, and 2xl:, along with the responsive class timeline-horizontal, to switch the timeline alignment to horizontal at specific breakpoints or vice the versa.

Utilize the provided example for a timeline item to implement a background change on hover.

The Informative timeline provides detailed information about each timeline item, including timestamps and descriptions.

The below example showcases a basic informative timeline.

The below example showcases a informative timeline with icons.

Utilize the provided example for a timeline item where the text is positioned within the timeline path.

The examples below showcase a styled timeline with text positioned inline within the timeline path.

The examples below showcase a timeline with icons that positioned inline within the timeline path.

Apply the modifier class timeline-centered to adjust the content positions of timeline-start and timeline-end. Additionally, include the timeline-shift modifier class within the <li> element to facilitate content adjustment on smaller screens.

Apply the modifier class timeline-snap-icon to align icons to the start instead of the middle, and utilize the responsive class timeline-compact to consolidate all items on one side specifically for smaller screens.

Utilize the provided example for a centered timeline with icons.

Use the provided example for timeline as activity log.

Use the provided example for timeline with last item collapsed.