Tabler React 2 Docs

Timeline

Timeline

Timeline is a component that displays a list of events. Used to communicate a series of related events, usually in a chronological order.

Signature

import { Timeline } from "tabler-react-2";
<Timeline {...props} />;

Props

PropRequiredTypeDefaultDescription
eventsYesEventListA list of events to display
denseNobooleanfalseDense mode

EventList

The events prop is an array of objects that define the events to display. Each event object must contain the following properties:

PropRequiredTypeDefaultDescription
iconYesnodeThe icon to display for the event. This can be any React node, but it is recommended to use an SVG icon from the @tabler/icons-react package.
iconBgClassNostringOptional background color class for the icon.
timeYesstringThe time of the event (e.g., "10 hrs ago").
titleYesstringThe title of the event (e.g., "+1150 Followers").
descriptionYesstringThe description of the event.
extraContentNonodeOptional extra content (e.g., images, avatars, etc.).

Basic Usage

<Timeline
events={[
{
icon: <IconCheck />,
time: "10 hrs ago",
title: "+1150 Followers",
description: "Joined the community",
},
{
icon: <IconMessage />,
time: "1 hr ago",
title: "New message",
description: "You have 1 new message",
},
{
icon: <IconUser />,
time: "1 hr ago",
title: "New user",
description: "You have 1 new user",
},
]}
/>

Colors

You can set the color of the icon using the iconBgColor prop to any of the colors.

<Timeline
dense
events={[
{
icon: <IconBrandTwitter />,
time: "10 hrs ago",
title: "+1150 Followers",
description: "New Twitter followers",
iconBgColor: "twitter",
},
{
icon: <IconMessage />,
time: "1 hr ago",
title: "New message",
description: "You have 1 new message",
iconBgColor: "red",
},
{
icon: <IconUser />,
time: "1 hr ago",
title: "New user",
description: "You have 1 new user",
},
]}
/>
Edit this page on GitHub