Timeline
Vertical and horizontal event timelines for audit logs, onboarding, and release history.
Overview
The Timeline component is a core building block of the Byteion design system, providing a robust, accessibility-compliant interface for its specific UI capabilities.
Why this exists
Timelines visualize events in chronological order. They are ideal for activity logs, project history, and process tracking.
Mental model
A timeline is a vertical line with events positioned chronologically. Each event has a dot, timestamp, and description.
When to use
When not to use
Basic example
The following example demonstrates standard usage, fully compliant with Byteion's token-first approach.
Activity timeline
-
Workspace created
The Byteion workspace and initial design tokens were set up for the ERP foundation.
-
Dashboard audit started
Missing reusable primitives were cataloged from the Tailwind ERP reference app.
-
Core package wired to workspaces
Docs now consume the local core and JS packages without vendor sync copies.
Compact changelog
Phase 1
Foundation
Tokens, base components, and utility patterns extracted from the reference dashboard.
Phase 2
Advanced surfaces
Calendar, Kanban, data table, and richer overlays turned into reusable shells.
Phase 3
Framework packages
React, Vue, Blade, and Bootstrap adapters consume the same token source of truth.
import { Timeline, TimelineItem } from '@byteion/react';
export default function TimelineDemo() {
return (
<Timeline className="p-6">
<TimelineItem tone="success" title="Order placed" meta="Apr 10, 09:14 AM">
Confirmation email sent to customer.
</TimelineItem>
<TimelineItem tone="primary" title="Payment captured" meta="Apr 10, 09:15 AM" />
<TimelineItem tone="warning" title="Picked & packed" meta="Apr 11, 08:02 AM" />
<TimelineItem title="Shipped" meta="Apr 11, 04:48 PM" />
</Timeline>
);
}
<script setup lang="ts">
import { Timeline, TimelineItem } from '@byteion/vue';
</script>
<template>
<Timeline class="p-6">
<TimelineItem tone="success" title="Order placed" meta="Apr 10, 09:14 AM">
Confirmation email sent to customer.
</TimelineItem>
<TimelineItem tone="primary" title="Payment captured" meta="Apr 10, 09:15 AM" />
<TimelineItem tone="warning" title="Picked & packed" meta="Apr 11, 08:02 AM" />
<TimelineItem title="Shipped" meta="Apr 11, 04:48 PM" />
</Timeline>
</template>
Variants
Each variant communicates a different meaning. Choose based on priority, not aesthetics.
Single default variant.
Sizes
Size should match the importance and context of the component.
- md — md size.
States
This component reacts seamlessly to the following interaction and data states:
- default — Resting appearance before interaction.
- hover — Pointer is over the element — visual feedback via color or shadow.
- focus — Keyboard or tab focus — shows ring indicator for accessibility.
- active — Currently selected or in use.
- disabled — Non-interactive — grayed out, cursor not-allowed.
Anatomy
Usage guidelines
- Show most recent events at the top.
- Use different dot styles for event types.
- Keep descriptions concise.
Do and Don't
Do
- Show newest first.
- Use dot variations for types.
- Keep descriptions short.
Don't
- Do not show events out of order.
- Do not overload with details.
- Do not use for non-time-based data.
Accessibility
Events should have descriptive labels. Timeline is an ordered list (<ol>).
Role:list
Customization
Line and dot colors follow design tokens.
Compose with React cva()
Use the exportedcva() +cn() utilities to compose your own variant on top of the Byteion tokens.
import { cva, cn, type VariantProps } from '@byteion/react';
const myTimeline = cva('base classes…', {
variants: {
accent: { soft:'border-primary-200', loud:'border-primary-500' },
},
defaultVariants: { accent:'soft' },
});
type Props = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof myTimeline>;
Compose with Vue cva()
Use the exportedcva() +cn() utilities inside standard Vue setup blocks.
<script setup lang="ts">
import { computed, useAttrs } from 'vue';
import { cva, type VariantProps } from '@byteion/vue';
interface Props { accent?:'soft' |'loud' }
const props = withDefaults(defineProps<Props>(), { accent:'soft' });
const attrs = useAttrs();
const myTimeline = cva('base classes…', {
variants: { accent: { soft:'border-primary-200', loud:'border-primary-500' } },
});
const cls = computed(() => myTimeline({ accent: props.accent, class: attrs.class as string | undefined }));
</script>
Runtime events
Byteion keeps framework APIs idiomatic: HTML uses DOM custom events, React uses callback props, and Vue uses emitted events / v-model updates.
HTML / JS events
No HTML runtime events are declared by this adapter.
React callbacks
No React callback events are declared by this adapter.
Vue emits
No Vue emitted events are declared by this adapter.
Remote / AJAX
This component does not implement Byteion JS remote loading. Use normal HTML form submission, framework state, or your application data layer around it.
API Reference
Static HTML composition.
HTML Data Attributes
No custom data attributes required.
React Props · TimelineProps
Extracted directly fromreact/src/components/Timeline.tsx.
export interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
children?: ReactNode;
}
Developer tips
Common mistakes
- Using Timeline for non-chronological content.
- Forgetting timestamps.
- Mixing newest-first and oldest-first order in the same product area.
- Using marker colour without text meaning.
- Putting too much detail in every event.
- Using Timeline when Table or DataTable is needed.
- Making static events focusable.
- Using raw colours instead of tokens.
Production usage tips
- Test empty timeline, one event, many events, long titles, missing descriptions, and missing timestamps.
- Test newest-first and oldest-first contexts.
- Test long histories with pagination or grouping.
- Test light mode, dark mode, and branded themes.
- Test marker contrast and connector visibility.
- For Laravel or server-rendered apps, render timelines from sorted event collections and use
<time datetime="">. - For React or Vue SPAs, keep timeline data sorted before rendering and paginate long histories.
- Coordinate Timeline with Avatar, Badge, Card, Accordion, Empty state, and Skeleton where needed.
Premium examples
Advanced patterns available in Byteion Pro:
Related components
- List — non-time-based vertical items
- Table — dense audit records
- Accordion — expandable event details
- Card — rich event summaries
- Avatar — event actor identity
- Badge — event status labels
- Empty state — no events state
- Skeleton — timeline loading placeholder
- Progress — milestone completion
- Stepper — guided multi-step flow
Unlock Premium Patterns
Get access to copy-paste ready Pro blocks, SaaS templates, and advanced data-tables built with this component.
Explore Pro Components