UIPackage
Menu

Framework

Change language

Boilerplate repo

Timeline

timelineui

Vertical or horizontal sequence of events with connectors and node markers. Statuses (pending, current, completed, failed) tint the connector. Use for activity feeds, audit logs, and progress tracking.

Also available for React ->

When to use which

Decision Guide

Timeline showcases chronological events and milestones past-to-present. Stepper guides users through a linear, multi-step workflow requiring active user progression.

ComponentRole
Timelinecurrent

Chronological feeds, delivery tracking logs, audit trails, and product roadmap milestones.

Activity & Milestone Stream
Stepper

Multi-step wizards, checkout sequences, onboarding flows, and form completion tracking.

Workflow Progression
  • Activity logs, tracking events, & milestones → Timeline
  • Multi-step wizard or form progression → Stepper (view)

Installation

$npx shadcn-vue@latest add https://uipkge.dev/r/vue/timeline.json
Named registry:npx shadcn-vue@latest add @uipkge/timelineInstalls to:app/components/ui/timeline/

Examples

Loading interactive previews…

Props

NameType / ValuesDefaultRequired
variant
'dot''icon''avatar''outline'
dotoptional
status
'default''current''success''warning''error''info''muted'
defaultoptional
classHTMLAttributes['class']optional
directionTimelineDirection'vertical'optional
alignTimelineAlign'start'optional
sideTimelineSideoptional
densityTimelineDensity'default'optional

Schema

Type aliases from this item's source — use them to shape the data you pass in.

TimelineContext
interface TimelineContext {
  direction: Ref<TimelineDirection>
  align: Ref<TimelineAlign>
  side: Ref<TimelineSide>
  density: Ref<TimelineDensity>
  itemIds: Ref<symbol[]>
  register: (id: symbol) => void
  unregister: (id: symbol) => void
}
TimelineItemContext
interface TimelineItemContext {
  index: Ref<number>
  isFirst: Ref<boolean>
  isLast: Ref<boolean>
  side: Ref<TimelineSide>
  status: Ref<TimelineStatus>
  direction: Ref<TimelineDirection>
  density: Ref<TimelineDensity>
}

npm dependencies

Used by

Files installed (12)

  • app/components/ui/timeline/Timeline.vue1.3 kB
    <script setup lang="ts">
    import { provide, ref, toRef } from 'vue'
    import type { HTMLAttributes } from 'vue'
    import { cn } from '@/lib/utils'
    import {
      TIMELINE_CONTEXT,
      type TimelineAlign,
      type TimelineDensity,
      type TimelineDirection,
      type TimelineSide,
    } from './context'
    
    const props = withDefaults(
      defineProps<{
        class?: HTMLAttributes['class']
        direction?: TimelineDirection
        align?: TimelineAlign
        side?: TimelineSide
        density?: TimelineDensity
      }>(),
      {
        direction: 'vertical',
        align: 'start',
        density: 'default',
      },
    )
    
    const itemIds = ref<symbol[]>([])
    
    provide(TIMELINE_CONTEXT, {
      direction: toRef(props, 'direction'),
      align: toRef(props, 'align'),
      side: toRef(() => props.side ?? (props.direction === 'horizontal' ? 'top' : 'left')),
      density: toRef(props, 'density'),
      itemIds,
      register: (id) => {
        if (!itemIds.value.includes(id)) itemIds.value.push(id)
      },
      unregister: (id) => {
        itemIds.value = itemIds.value.filter((i) => i !== id)
      },
    })
    </script>
    
    <template>
      <div
        data-uipkge
        data-slot="timeline"
        :data-direction="direction"
        :data-align="align"
        :class="cn('relative', direction === 'vertical' ? 'flex flex-col' : 'flex flex-row', props.class)"
        v-bind="$attrs"
      >
        <slot />
      </div>
    </template>
    
  • app/components/ui/timeline/TimelineItem.vue5.2 kB
  • app/components/ui/timeline/TimelineMedia.vue2.8 kB
  • app/components/ui/timeline/TimelineSeparator.vue1.4 kB
  • app/components/ui/timeline/TimelineContent.vue0.3 kB
  • app/components/ui/timeline/TimelineHeader.vue0.4 kB
  • app/components/ui/timeline/TimelineTitle.vue0.5 kB
  • app/components/ui/timeline/TimelineDescription.vue0.4 kB
  • app/components/ui/timeline/TimelineDate.vue0.3 kB
  • app/components/ui/timeline/context.ts1 kB
  • app/components/ui/timeline/timeline.variants.ts4.2 kB
  • app/components/ui/timeline/index.ts0.9 kB

Raw manifest:https://uipkge.dev/r/vue/timeline.json