Svelte Timeline - Flowbite
Get started with the responsive timeline component to show data in a chronological order with support for multiple styles, sizes, and variants
The timeline component can be used to show series of data in a chronological order for use cases such as activity feeds, user actions, application updates, and more.
Setup #
- Svelte
<script>
  import { Timeline, TimelineItem, TimelineItemVertical, TimelineItemHorizontal, TimelineHorizontal, Activity, ActivityItem, Group, GroupItem } from 'flowbite-svelte';
</script>Default timeline #
-   Application UI code in Tailwind CSSGet access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. 
-   Application UI code in Tailwind CSSAll 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. 
-   Application UI code in Tailwind CSSGet started with dozens of web components and interactive elements built on top of Tailwind CSS. 
- Svelte
<script>
  import { Timeline, TimelineItem, Button } from 'flowbite-svelte';
  import { ArrowRightOutline } from 'flowbite-svelte-icons';
</script>
<Timeline>
  <TimelineItem title="Application UI code in Tailwind CSS" date="February 2022">
    <p class="mb-4 text-base font-normal text-gray-500 dark:text-gray-400">Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.</p>
    <Button color="alternative">Learn more<ArrowRightOutline class="ml-2 w-3 h-3" /></Button>
  </TimelineItem>
  <TimelineItem title="Application UI code in Tailwind CSS" date="March 2022">
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">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>
  </TimelineItem>
  <TimelineItem title="Application UI code in Tailwind CSS" date="April 2022">
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">Get started with dozens of web components and interactive elements built on top of Tailwind CSS.</p>
  </TimelineItem>
</Timeline>Vertical Timeline #
Use this vertical timeline component with icons and badges to show a more advanced set of data.
-     Flowbite Application UI v2.0.0Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. 
-     Flowbite Figma v1.3.0All 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. 
-     Flowbite Library v1.2.2Get started with dozens of web components and interactive elements built on top of Tailwind CSS. 
- Svelte
<script>
  import { Timeline, TimelineItem } from 'flowbite-svelte';
  import { CalendarWeekSolid } from 'flowbite-svelte-icons';
</script>
<Timeline order="vertical">
  <TimelineItem title="Flowbite Application UI v2.0.0" date="Released on January 13th, 2022">
    <svelte:fragment slot="icon">
      <span class="flex absolute -left-3 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-primary-900">
        <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
      </span>
    </svelte:fragment>
    <p class="mb-4 text-base font-normal text-gray-500 dark:text-gray-400">Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.</p>
  </TimelineItem>
  <TimelineItem title="Flowbite Figma v1.3.0" date="Released on December 7th, 2021">
    <svelte:fragment slot="icon">
      <span class="flex absolute -left-3 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-primary-900">
        <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
      </span>
    </svelte:fragment>
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">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>
  </TimelineItem>
  <TimelineItem title="Flowbite Library v1.2.2" date="Released on December 2nd, 2021">
    <svelte:fragment slot="icon">
      <span class="flex absolute -left-3 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-primary-900">
        <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
      </span>
    </svelte:fragment>
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">Get started with dozens of web components and interactive elements built on top of Tailwind CSS.</p>
  </TimelineItem>
</Timeline>Horizontal Timeline #
Use this horizontally aligned timeline component to show a series of data in a chronological order.
-  Flowbite Library v1.0.0Get started with dozens of web components and interactive elements. 
-  Flowbite Library v1.2.0Get started with dozens of web components and interactive elements. 
-  Flowbite Library v1.3.0Get started with dozens of web components and interactive elements. 
- Svelte
<script>
  import { Timeline, TimelineItem } from 'flowbite-svelte';
  import { CalendarWeekSolid } from 'flowbite-svelte-icons';
</script>
<Timeline order="horizontal">
  <TimelineItem title="Flowbite Library v1.0.0" date="Released on December 2nd, 2021">
    <svelte:fragment slot="icon">
      <div class="flex items-center">
        <div class="flex z-10 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-0 ring-white dark:bg-primary-900 sm:ring-8 dark:ring-gray-900 shrink-0">
          <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
        </div>
        <div class="hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700" />
      </div>
    </svelte:fragment>
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">Get started with dozens of web components and interactive elements.</p>
  </TimelineItem>
  <TimelineItem title="Flowbite Library v1.2.0" date="Released on December 23th, 2021">
    <svelte:fragment slot="icon">
      <div class="flex items-center">
        <div class="flex z-10 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-0 ring-white dark:bg-primary-900 sm:ring-8 dark:ring-gray-900 shrink-0">
          <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
        </div>
        <div class="hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700" />
      </div>
    </svelte:fragment>
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">Get started with dozens of web components and interactive elements.</p>
  </TimelineItem>
  <TimelineItem title="Flowbite Library v1.3.0" date="Released on January 5th, 2021">
    <svelte:fragment slot="icon">
      <div class="flex items-center">
        <div class="flex z-10 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-0 ring-white dark:bg-primary-900 sm:ring-8 dark:ring-gray-900 shrink-0">
          <CalendarWeekSolid class="w-3 h-3 text-primary-600 dark:text-primary-400" />
        </div>
        <div class="hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700" />
      </div>
    </svelte:fragment>
    <p class="text-base font-normal text-gray-500 dark:text-gray-400">Get started with dozens of web components and interactive elements.</p>
  </TimelineItem>
</Timeline>Activity Log #
This component can be used to show the timline of a user’s activity history inside your application by using an avatar, datetime, description, and links to specific pages.
 Bonnie moved Jese Leos to Funny Group Bonnie moved Jese Leos to Funny Group
 We don’t serve their kind here! What? Your droids.The approach will not be easy. You are required to maneuver straight down this trench and skim the surface to this point. The target area is only two meters wide. We don’t serve their kind here! What? Your droids.The approach will not be easy. You are required to maneuver straight down this trench and skim the surface to this point. The target area is only two meters wide.
 They’ll have to wait outside. We don’t want them here. They’ll have to wait outside. We don’t want them here.
- Svelte
<script>
  import { Activity, ActivityItem } from 'flowbite-svelte';
  let activities = [
    {
      title: 'Bonnie moved <a href="/" class="font-semibold text-primary-600 dark:text-primary-500 hover:underline">Jese Leos</a> to <span class="bg-gray-100 text-gray-800 text-xs font-normal mr-2 px-2.5 py-0.5 rounded dark:bg-gray-600 dark:text-gray-300">Funny Group</span>',
      date: 'just now',
      alt: 'image alt here',
      src: '/images/profile-picture-2.webp'
    },
    {
      title: 'We don’t serve their kind here! What? Your droids. ',
      date: '2 hours ago',
      alt: 'image alt here',
      src: '/images/profile-picture-2.webp',
      text: 'The approach will not be easy. You are required to maneuver straight down this trench and skim the surface to this point. The target area is only two meters wide. '
    },
    {
      title: 'They’ll have to wait outside. We don’t want them here. ',
      date: '1 day ago',
      alt: 'image alt here',
      src: '/images/profile-picture-3.webp'
    }
  ];
</script>
<Activity>
  <ActivityItem {activities} />
</Activity>Grouped timeline #
Use this component to group multiple data entries inside a single date and show elements like the avatar, title, description, tag and link to a relevant page.
- Svelte
<script>
  import { Group, GroupItem } from 'flowbite-svelte';
  let groupTimelines = [
    {
      title: '<span class="font-medium text-gray-900 dark:text-white">Jese Leos</span> likes <span class="font-medium text-gray-900 dark:text-white">Bonnie Green\'s</span> post in <span class="font-medium text-gray-900 dark:text-white"> How to start with Flowbite library</span>',
      src: '/images/profile-picture-1.webp',
      alt: 'alt here',
      href: '/',
      isPrivate: true,
      comment: '"I wanted to share a webinar zeroheight."'
    },
    {
      title: '<span class="font-medium text-gray-900 dark:text-white">Bonnie Green</span> react to <span class="font-medium text-gray-900 dark:text-white">Thomas Lean\'s</span> comment',
      src: '/images/profile-picture-2.webp',
      alt: 'alt here',
      href: '/',
      isPrivate: true,
      comment: '"I wanted to share a webinar zeroheight."'
    }
  ];
</script>
<Group date="January 13th, 2022">
  <GroupItem timelines={groupTimelines} />
</Group>Component data #
The component has the following props, type, and default values. See types page for type information.
Timeline styling #
- Use the classprop to overwrite theoltag class.
TimelineItem styling #
- Use the classLiprop to overwrite thelitag class.
- Use the classDivprop to overwrite thedivtag class.
- Use the classTimeprop to overwrite thetimetag class.
TimelineHorizontal styling #
- Use the liClassprop to overwriteclassLi.
- Use the divClassprop to overwriteclassDiv.
- Use the timeClassprop to overwriteclassTime.
- Use the pClassprop to overwriteclassP.
- Use the aClassprop to overwriteclassA.
Activity styling #
- Use the classprop to overwriteolClass.
ActivityItem styling #
- Use the classLiprop to overwriteliClass.
- Use the classSpanprop to overwritespanClass.
- Use the classImgprop to overwriteimgClass.
- Use the classOuterDivprop to overwriteouterDivClass.
- Use the classInnerDivprop to overwriteinnerDivClass.
- Use the classTimeprop to overwritetimeClass.
- Use the classTitleprop to overwritetitleClass.
- Use the classTextprop to overwritetextClass.
Group styling #
- Use the classDivprop to overwritedivClass.
- Use the classTimeprop to overwritetimeClass.
- Use the classOlprop to overwriteolClass.
GroupItem styling #
- Use the classAprop to overwriteaClass.
- Use the classImgprop to overwriteimgClass.
- Use the classDivprop to overwritedivClass.
- Use the classTitleprop to overwritetitleClass.
- Use the classSpanprop to overwritespanClass.
TimelineItemVertical styling #
- Use the classLiprop to overwriteliClass.
- Use the classSpanprop to overwritespanClass.
- Use the classH3prop to overwriteh3Class.
- Use the classTimeprop to overwritetimeClass.
TimelineItemHorizonal styling #
- Use the classprop to overwrite theoltag class.
