React Timeline - Flowbite
Use the timeline component from Flowbite React to display a list of items and events in a chronological order based on multiples styles, colors and layouts
The timeline component can be used to show a list of events and items in a chronological order with a vertical or horizontal alignment based on multiple examples, styles, layouts, and colors.
You can customize the content and options of the timeline component by using the custom React props API from Flowbite React and the utility classes from Tailwind CSS for quick style changes.
In order to use the timeline component make sure to import it first from Flowbite React:
'use client';
import { Timeline } from 'flowbite-react';
Default timeline
Use the <Timeline>
React component and the child components to create a list of items inside the timeline component featuring the date, title, description and even a button.
Application UI code in Tailwind CSS
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
Marketing UI design in Figma
All of the pages and components are first designed in Figma and we keep a parity between the two versions even as we update the project.
E-Commerce UI code in Tailwind CSS
Get started with dozens of web components and interactive elements built on top of Tailwind CSS.
- React TypeScript
'use client';
import { Button, Timeline } from 'flowbite-react';
export default function DefaultTimeline() {
return (
<Timeline>
<Timeline.Item>
<Timeline.Point />
<Timeline.Content>
<Timeline.Time>
February 2022
</Timeline.Time>
<Timeline.Title>
Application UI code in Tailwind CSS
</Timeline.Title>
<Timeline.Body>
<p>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order
E-commerce & Marketing pages.
</p>
</Timeline.Body>
<Button color="gray">
<p>
Learn More
</p>
<HiArrowNarrowRight className="ml-2 h-3 w-3" />
</Button>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point />
<Timeline.Content>
<Timeline.Time>
March 2022
</Timeline.Time>
<Timeline.Title>
Marketing UI design in Figma
</Timeline.Title>
<Timeline.Body>
<p>
All of the pages and components are first designed in Figma and we keep a parity between the two versions even
as we update the project.
</p>
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point />
<Timeline.Content>
<Timeline.Time>
April 2022
</Timeline.Time>
<Timeline.Title>
E-Commerce UI code in Tailwind CSS
</Timeline.Title>
<Timeline.Body>
<p>
Get started with dozens of web components and interactive elements built on top of Tailwind CSS.
</p>
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
</Timeline>
)
}
Vertical timeline
Use this example to show the timeline component and the child components in a vertical alignment.
Application UI code in Tailwind CSS
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
Marketing UI design in Figma
All of the pages and components are first designed in Figma and we keep a parity between the two versions even as we update the project.
E-Commerce UI code in Tailwind CSS
Get started with dozens of web components and interactive elements built on top of Tailwind CSS.
- React TypeScript
'use client';
import { Button, Timeline } from 'flowbite-react';
export default function VerticalTimeline() {
return (
<Timeline>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Time>
February 2022
</Timeline.Time>
<Timeline.Title>
Application UI code in Tailwind CSS
</Timeline.Title>
<Timeline.Body>
<p>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order
E-commerce & Marketing pages.
</p>
</Timeline.Body>
<Button color="gray">
<p>
Learn More
</p>
<HiArrowNarrowRight className="ml-2 h-3 w-3" />
</Button>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Time>
March 2022
</Timeline.Time>
<Timeline.Title>
Marketing UI design in Figma
</Timeline.Title>
<Timeline.Body>
<p>
All of the pages and components are first designed in Figma and we keep a parity between the two versions even
as we update the project.
</p>
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Time>
April 2022
</Timeline.Time>
<Timeline.Title>
E-Commerce UI code in Tailwind CSS
</Timeline.Title>
<Timeline.Body>
<p>
Get started with dozens of web components and interactive elements built on top of Tailwind CSS.
</p>
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
</Timeline>
)
}
Horizontal timeline
Use the horizontal
prop to show the timeline component and the child components in a horizontal alignment.
Flowbite Library v1.0.0
Get started with dozens of web components and interactive elements.Flowbite Library v1.2.0
Get started with dozens of web components and interactive elements.Flowbite Library v1.3.0
Get started with dozens of web components and interactive elements.
- React TypeScript
'use client';
import { Timeline } from 'flowbite-react';
export default function StepperTimeline() {
return (
<Timeline horizontal>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Title>
Flowbite Library v1.0.0
</Timeline.Title>
<Timeline.Time>
Released on December 2, 2021
</Timeline.Time>
<Timeline.Body>
Get started with dozens of web components and interactive elements.
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Title>
Flowbite Library v1.2.0
</Timeline.Title>
<Timeline.Time>
Released on December 23, 2021
</Timeline.Time>
<Timeline.Body>
Get started with dozens of web components and interactive elements.
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
<Timeline.Item>
<Timeline.Point icon={HiCalendar} />
<Timeline.Content>
<Timeline.Title>
Flowbite Library v1.3.0
</Timeline.Title>
<Timeline.Time>
Released on January 5, 2022
</Timeline.Time>
<Timeline.Body>
Get started with dozens of web components and interactive elements.
</Timeline.Body>
</Timeline.Content>
</Timeline.Item>
</Timeline>
)
}
Theme
To learn more about how to customize the appearance of components, please see the Theme docs.
{
"root": {
"direction": {
"horizontal": "items-base sm:flex",
"vertical": "relative border-l border-gray-200 dark:border-gray-700"
}
},
"item": {
"root": {
"horizontal": "relative mb-6 sm:mb-0",
"vertical": "mb-10 ml-6"
},
"content": {
"root": {
"base": "mt-3 sm:pr-8"
},
"body": "mb-4 text-base font-normal text-gray-500 dark:text-gray-400",
"time": "mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",
"title": "text-lg font-semibold text-gray-900 dark:text-white"
},
"point": {
"horizontal": "flex items-center",
"line": "hidden h-0.5 w-full bg-gray-200 dark:bg-gray-700 sm:flex",
"marker": {
"base": {
"horizontal": "absolute -left-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700",
"vertical": "absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700"
},
"icon": {
"base": "h-3 w-3 text-cyan-600 dark:text-cyan-300",
"wrapper": "absolute -left-3 flex h-6 w-6 items-center justify-center rounded-full bg-cyan-200 ring-8 ring-white dark:bg-cyan-900 dark:ring-gray-900"
}
},
"vertical": ""
}
}
}