
Displaying Timelines
- 55 installs
- 426 repo stars
- Updated December 11, 2025
- ancoleman/ai-design-components
displaying-timelines is a Claude skill that implements timeline, activity-feed, Gantt-chart, and calendar UI components for chronological data.
About
This skill implements timeline and activity UI components: vertical/horizontal timelines, activity feeds, Gantt charts, and calendar interfaces. A developer uses it when showing chronological events, project schedules, social feeds, notifications, or audit logs. It provides a use-case decision framework, real-time update patterns, timestamp formatting, and accessible responsive implementations.
- Decision framework mapping use case to timeline/feed component type
- Patterns for activity feeds, Gantt charts, calendars, and audit logs
- Timestamp formatting, real-time updates, and WCAG/ARIA accessibility
Displaying Timelines by the numbers
- 55 all-time installs (skills.sh)
- Ranked #1,259 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
displaying-timelines capabilities & compatibility
- Capabilities
- timeline ui · activity feed ui · gantt chart ui · calendar ui
- Use cases
- frontend · ui design · web design
What displaying-timelines says it does
This skill enables systematic creation of timeline and activity components, from simple vertical timelines to complex interactive Gantt charts.
System Events → Audit Log (searchable, exportable, precise timestamps)
npx skills add https://github.com/ancoleman/ai-design-components --skill displaying-timelinesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 55 |
|---|---|
| repo stars | ★ 426 |
| Last updated | December 11, 2025 |
| Repository | ancoleman/ai-design-components ↗ |
What it does
Building timeline, activity-feed, Gantt-chart, and calendar UI components for chronological or time-based data.
Who is it for?
Building activity feeds, timelines, Gantt charts, and calendar views for time-based data.
Skip if: Non-temporal UI or backend data modeling with no chronological display.
When should I use this skill?
Showing chronological events, project schedules, social feeds, notifications, or audit logs.
What you get
An accessible, responsive timeline or activity component matched to the use case with proper timestamp formatting.
- Timeline component
- Activity feed
- Gantt chart
By the numbers
- 7-way component decision framework
- Bundled TSX examples and a Gantt data-generation script
Files
Displaying Timelines & Activity Components
Purpose
This skill enables systematic creation of timeline and activity components, from simple vertical timelines to complex interactive Gantt charts. It provides clear decision frameworks based on use case and data characteristics, ensuring optimal performance, real-time updates, and accessible implementations.
When to Use
Activate this skill when:
- Creating activity feeds (social, notifications, audit logs)
- Displaying timelines (vertical, horizontal, interactive)
- Building Gantt charts or project schedules
- Implementing calendar interfaces (month, week, day views)
- Showing chronological events or historical data
- Handling real-time activity updates
- Requiring timestamp formatting (relative, absolute)
- Ensuring timeline accessibility or responsive behavior
Quick Decision Framework
Select component type based on use case:
Social Activity → Activity Feed (infinite scroll, reactions)
System Events → Audit Log (searchable, exportable, precise timestamps)
User Notifications → Notification Feed (read/unread, grouped by date)
Historical Events → Vertical Timeline (milestones, alternating sides)
Project Planning → Gantt Chart (dependencies, drag-to-reschedule)
Scheduling → Calendar Interface (month/week/day views)
Interactive Roadmap → Horizontal Timeline (zoom, pan, filter)For detailed selection criteria, reference references/component-selection.md.
Core Implementation Patterns
Activity Feeds
Social Feed Pattern:
- User avatar + name + action description
- Relative timestamps ("2 hours ago")
- Reactions and comments
- Infinite scroll with pagination
- Real-time updates via WebSocket
- Reference
references/activity-feeds.md
Notification Feed Pattern:
- Grouped by date sections
- Read/unread states with indicators
- Mark all as read functionality
- Filter by notification type
- Action buttons (view, dismiss)
- Reference
references/notification-feeds.md
Audit Log Pattern:
- System events with precise timestamps
- User action tracking
- Searchable with advanced filters
- Exportable (CSV, JSON)
- Security-focused display
- Reference
references/audit-logs.md
Example: examples/social-activity-feed.tsx
Timeline Visualizations
Vertical Timeline:
- Events stacked chronologically
- Connecting line with marker dots
- Date markers and event cards
- Optional alternating sides
- Best for: Historical events, project milestones
- Reference
references/vertical-timelines.md
Horizontal Timeline:
- Events along horizontal axis
- Scroll or zoom to navigate
- Density varies by zoom level
- Best for: Project timelines, roadmaps
- Reference
references/horizontal-timelines.md
Interactive Timeline:
- Click events for detail view
- Filter by category/type
- Zoom in/out controls
- Pan and scroll navigation
- Best for: Data exploration, rich interactivity
- Reference
references/interactive-timelines.md
Example: examples/milestone-timeline.tsx
Gantt Charts
Project Planning Features:
- Tasks as horizontal bars
- Dependencies with arrows
- Critical path highlighting
- Drag to reschedule
- Progress indicators
- Milestone markers (diamonds)
- Resource allocation
- Today marker line
- Zoom levels (day/week/month/year)
To generate Gantt chart data:
python scripts/generate_gantt_data.py --tasks 50 --dependencies autoReference references/gantt-patterns.md for implementation details.
Example: examples/project-gantt.tsx
Calendar Interfaces
Month View:
- Traditional calendar grid
- Events in date cells
- Click to create/edit
- Color-coded categories
- Multi-calendar overlay
Week View:
- Time slots (hourly)
- Events as draggable blocks
- Resize to change duration
- Multiple calendars overlay
Day/Agenda View:
- Detailed daily schedule
- List format with time duration
- Location and attendees
- Scrollable timeline
Reference references/calendar-patterns.md for all views.
Example: examples/calendar-scheduler.tsx
Timestamp Formatting
Essential timestamp patterns:
Relative (Recent Events):
- "Just now" (<1 min)
- "5 minutes ago"
- "3 hours ago"
- "Yesterday at 3:42 PM"
Absolute (Older Events):
- "Jan 15, 2025"
- "January 15, 2025 at 3:42 PM"
- ISO 8601 for APIs
Implementation Considerations:
- Timezone handling (display user's local time)
- Locale-aware formatting
- Hover for precise timestamp
- Auto-update relative times
To format timestamps consistently:
node scripts/format_timestamps.js --locale en-US --timezone autoReference references/timestamp-formatting.md for complete patterns.
Real-Time Updates
Live Activity Feed:
- WebSocket or SSE for new events
- Smooth insertion animation
- "X new items" notification banner
- Click to load new items
- Optimistic updates for user actions
Implementation Pattern: 1. Show user action immediately 2. Update timestamp to "Just now" 3. Send to server in background 4. Rollback if error occurs
Reference references/real-time-updates.md for WebSocket patterns.
Example: examples/realtime-activity.tsx
Performance Optimization
Critical performance thresholds:
<100 events → Client-side rendering, no virtualization
100-1,000 events → Virtual scrolling recommended
1,000+ events → Virtual scrolling + server pagination
Real-time → Debounce updates, batch insertionsOptimization Strategies:
- Memoize timeline item components
- Lazy load event details
- Virtual scrolling for long timelines
- Debounce real-time updates (batch every 500ms)
- Optimize timestamp calculations
To benchmark performance:
node scripts/benchmark_timeline.js --events 10000Reference references/performance-optimization.md for details.
Accessibility Requirements
Essential WCAG compliance:
Semantic HTML:
- Use
<ol>or<ul>for timelines - Proper heading hierarchy
- Semantic time elements
ARIA Patterns:
role="feed"for activity feedsrole="article"for timeline itemsaria-labelfor timestampsaria-busyduring loading
Keyboard Navigation:
- Tab through interactive items
- Arrow keys for timeline navigation
- Enter/Space to expand items
- Skip to latest/oldest controls
Screen Reader Support:
- Announce new items in feeds
- Descriptive timestamp labels
- Progress updates for Gantt charts
To validate accessibility:
node scripts/validate_timeline_accessibility.jsReference references/accessibility-patterns.md for complete requirements.
Responsive Design
Three proven strategies:
1. Stack Vertically (Mobile)
- Convert horizontal to vertical
- Maintain chronological order
- Adjust spacing and font sizes
2. Simplify Display
- Show essential info only
- Expand for details
- Reduce visual complexity
3. Horizontal Scroll
- Keep layout intact
- Enable touch scrolling
- Add scroll indicators
Reference references/responsive-strategies.md for implementations.
Example: examples/responsive-timeline.tsx
Library Recommendations
Timeline: react-chrono (Flexible)
Best for timeline visualizations with rich content:
- Horizontal, vertical, alternating layouts
- Image and video support
- Custom item rendering
- TypeScript support
- Responsive out of the box
npm install react-chronoSee examples/react-chrono-timeline.tsx for setup.
Alternative: react-vertical-timeline-component
- Simple, clean vertical timelines
- Lightweight (~10KB)
- Icon support
- Good for basic timelines
Gantt Charts: SVAR React Gantt
Best for project management:
- Modern, dependency-free
- Drag-and-drop tasks
- Dependencies and milestones
- Customizable appearance
- TypeScript ready
npm install @svar/ganttEnterprise Alternative: Bryntum Gantt
- Feature-complete solution
- Commercial license required
- Handles complex projects
- Advanced resource management
Calendar: react-big-calendar
Best for scheduling interfaces:
- Month, week, day, agenda views
- Drag-and-drop events
- Customizable styling
- Large community support
npm install react-big-calendarAlternative: FullCalendar
- Premium features available
- Excellent documentation
- Multiple framework support
For detailed comparison, reference references/library-comparison.md.
Design Token Integration
Timelines use the design-tokens skill for consistent theming:
Timeline-Specific Tokens:
--timeline-line-color- Connecting line color--timeline-dot-color- Event marker color--timeline-dot-active-color- Current/active event--event-card-bg- Event card background--timestamp-color- Timestamp text
Standard Token Categories:
- Color tokens for backgrounds and states
- Spacing tokens for gaps and padding
- Typography tokens for text hierarchy
- Shadow tokens for card elevation
- Motion tokens for animations
Supports light, dark, high-contrast, and custom themes. Reference the design-tokens skill for theme switching.
Working Examples
Start with the example matching the requirements:
social-activity-feed.tsx # Social feed with reactions
notification-center.tsx # Notification system with filters
audit-log-viewer.tsx # System audit log
milestone-timeline.tsx # Vertical timeline with milestones
project-gantt.tsx # Gantt chart with dependencies
calendar-scheduler.tsx # Full calendar with all views
realtime-activity.tsx # Live updates via WebSocket
responsive-timeline.tsx # Mobile-optimized timelineTesting Tools
Generate mock timeline data:
python scripts/generate_timeline_data.py --events 500 --realtimeTest real-time updates:
node scripts/simulate_realtime.js --rate 5/sec --duration 60sValidate accessibility:
node scripts/validate_timeline_accessibility.jsBenchmark performance:
node scripts/benchmark_timeline.js --events 10000 --virtualNext Steps
1. Identify the timeline use case (activity, events, schedule) 2. Select the appropriate component type 3. Choose a library or build custom with tokens 4. Start with the matching example file 5. Implement core functionality 6. Add real-time updates if needed 7. Test performance with large datasets 8. Validate accessibility compliance 9. Apply responsive strategy for mobile
Timeline Assets
This directory contains templates, schemas, and configuration files for timeline components.
Contents
- timeline-schemas.json - JSON schemas for timeline data structures
- event-templates.json - Reusable event templates
- gantt-config.json - Gantt chart configuration presets
- calendar-themes.json - Calendar styling configurations
Usage
These assets are referenced by examples and scripts to provide consistent data structures and configurations across timeline implementations.
/**
* Audit Log Viewer Example
*
* Demonstrates audit log with:
* - Precise timestamps
* - Search and filtering
* - Export functionality
* - Security event tracking
*/
// Example implementation placeholder
/**
* Calendar Scheduler Example
*
* Demonstrates calendar with:
* - Month/week/day views
* - Drag-and-drop events
* - Event creation
* - Multi-calendar support
*/
// Example implementation placeholder
/**
* Milestone Timeline Example
*
* Demonstrates vertical timeline with:
* - Connecting line
* - Event markers
* - Alternating layout
* - Event cards with details
*/
// Example implementation placeholder
/**
* Notification Center Example
*
* Demonstrates notification system with:
* - Read/unread states
* - Grouping by date
* - Filtering by type
* - Mark all as read
*/
// Example implementation placeholder
/**
* Project Gantt Chart Example
*
* Demonstrates Gantt chart with:
* - Task bars
* - Dependencies
* - Drag-to-reschedule
* - Progress indicators
* - Resource allocation
*/
// Example implementation placeholder
/**
* React Chrono Timeline Example
*
* Demonstrates react-chrono library integration with:
* - Vertical and horizontal layouts
* - Custom styling with design tokens
* - Media content support
* - Interactive features
*/
// Example implementation placeholder
/**
* Real-time Activity Example
*
* Demonstrates real-time updates with:
* - WebSocket connection
* - Optimistic updates
* - New item notifications
* - Smooth animations
*/
// Example implementation placeholder
/**
* Responsive Timeline Example
*
* Demonstrates mobile-optimized timeline with:
* - Adaptive layout
* - Touch interactions
* - Simplified mobile view
* - Responsive breakpoints
*/
// Example implementation placeholder
/**
* Social Activity Feed Example
*
* Demonstrates activity feed with:
* - Infinite scroll
* - Relative timestamps
* - Reactions and comments
* - Real-time updates
*/
// Example implementation placeholder
// Full implementation to be added during skill expansion
skill: "displaying-timelines"
version: "1.0"
domain: "frontend"
# Base outputs required for all timeline implementations
base_outputs:
- path: "components/timelines/"
must_contain: []
description: "Timeline component implementations"
- path: "package.json"
must_contain: ["dependencies", "scripts"]
description: "Project dependencies and build scripts"
- path: "types/timeline-data.ts"
must_contain: ["interface", "type", "TimelineEvent"]
description: "TypeScript types for timeline event structures"
- path: "utils/timestamp-formatting.ts"
must_contain: ["format", "relative", "absolute"]
description: "Timestamp formatting utilities (relative/absolute time)"
# Conditional outputs based on configuration
conditional_outputs:
maturity:
starter:
# Starter: Basic vertical timeline with static data
- path: "components/timelines/VerticalTimeline.tsx"
must_contain: ["timeline", "event", "marker", "date"]
description: "Basic vertical timeline with chronological events"
- path: "components/timelines/TimelineEvent.tsx"
must_contain: ["title", "description", "timestamp"]
description: "Individual timeline event component"
- path: "components/timelines/ActivityFeed.tsx"
must_contain: ["feed", "activity", "timestamp", "avatar"]
description: "Simple activity feed for social/notification display"
- path: "utils/timestamp-formatting.ts"
must_contain: ["formatRelativeTime", "formatAbsoluteTime"]
description: "Basic timestamp formatting (relative: '2 hours ago', absolute: 'Jan 15, 2025')"
- path: "data/sample-timeline-data.ts"
must_contain: ["export", "events", "timestamp"]
description: "Sample timeline event datasets for development"
- path: "styles/timeline.css"
must_contain: [".timeline", ".event", ".marker", ".line"]
description: "Basic timeline styling with connecting lines and markers"
intermediate:
# Intermediate: Interactive timelines with filtering and responsive design
- path: "components/timelines/VerticalTimeline.tsx"
must_contain: ["timeline", "event", "marker", "alternating", "responsive"]
description: "Responsive vertical timeline with alternating sides"
- path: "components/timelines/HorizontalTimeline.tsx"
must_contain: ["horizontal", "scroll", "zoom", "pan"]
description: "Horizontal timeline with zoom and pan controls"
- path: "components/timelines/ActivityFeed.tsx"
must_contain: ["feed", "infinite scroll", "pagination", "filter"]
description: "Activity feed with infinite scroll and filtering"
- path: "components/timelines/NotificationFeed.tsx"
must_contain: ["notification", "read", "unread", "group by date"]
description: "Notification feed with read/unread states and date grouping"
- path: "components/timelines/TimelineFilter.tsx"
must_contain: ["filter", "category", "date range"]
description: "Filter panel for timeline events by category and date"
- path: "components/timelines/CalendarView.tsx"
must_contain: ["calendar", "month", "events"]
description: "Calendar month view with event display"
- path: "hooks/useRealtimeUpdates.ts"
must_contain: ["WebSocket|SSE", "useEffect", "update"]
description: "Real-time update hook for live activity feeds"
- path: "utils/timezone-handling.ts"
must_contain: ["timezone", "UTC", "locale"]
description: "Timezone conversion and locale-aware formatting"
- path: "tests/timelines/VerticalTimeline.test.tsx"
must_contain: ["render", "screen", "expect"]
description: "Unit tests for timeline components"
advanced:
# Advanced: Gantt charts, calendar interfaces, real-time updates, full accessibility
- path: "components/timelines/GanttChart.tsx"
must_contain: ["gantt", "task", "dependency", "drag", "resize"]
description: "Full Gantt chart with dependencies, drag-to-reschedule, and progress tracking"
- path: "components/timelines/InteractiveTimeline.tsx"
must_contain: ["zoom", "pan", "filter", "detail view", "keyboard navigation"]
description: "Interactive timeline with zoom, pan, filters, and keyboard navigation"
- path: "components/timelines/CalendarScheduler.tsx"
must_contain: ["month view", "week view", "day view", "drag", "resize"]
description: "Full calendar scheduler with month/week/day views and event management"
- path: "components/timelines/AuditLogViewer.tsx"
must_contain: ["audit", "search", "export", "filter", "precise timestamp"]
description: "Audit log viewer with search, export, and advanced filtering"
- path: "components/timelines/RealtimeActivityFeed.tsx"
must_contain: ["WebSocket", "optimistic update", "rollback", "batch"]
description: "Real-time activity feed with optimistic updates and batching"
- path: "components/timelines/accessibility/TimelineA11y.tsx"
must_contain: ["role=\"feed\"", "aria-label", "role=\"article\"", "aria-busy"]
description: "Accessibility wrapper with WCAG 2.1 AA compliance (ARIA roles, labels)"
- path: "components/timelines/accessibility/KeyboardNavigation.tsx"
must_contain: ["onKeyDown", "tabIndex", "ArrowUp", "ArrowDown"]
description: "Keyboard navigation support (Tab, Arrow keys, Enter/Space)"
- path: "hooks/useVirtualScrolling.ts"
must_contain: ["virtual", "viewport", "render", "1000+"]
description: "Virtual scrolling for timelines with 1000+ events"
- path: "hooks/useWebSocket.ts"
must_contain: ["WebSocket", "reconnect", "heartbeat", "onMessage"]
description: "WebSocket hook with reconnection and heartbeat"
- path: "hooks/useOptimisticUpdate.ts"
must_contain: ["optimistic", "rollback", "pending", "commit"]
description: "Optimistic update hook for immediate UI feedback"
- path: "utils/performance/virtual-scrolling.ts"
must_contain: ["virtual", "window", "offset", "render"]
description: "Virtual scrolling implementation for performance optimization"
- path: "utils/performance/batch-updates.ts"
must_contain: ["batch", "debounce", "500ms", "queue"]
description: "Batch real-time updates (debounce 500ms) for performance"
- path: "utils/export-timeline.ts"
must_contain: ["export", "CSV", "JSON", "PDF"]
description: "Timeline export utilities (CSV, JSON, PDF formats)"
- path: "scripts/generate-gantt-data.py"
must_contain: ["generate", "tasks", "dependencies", "critical path"]
description: "Script to generate Gantt chart data with dependencies"
- path: "scripts/validate-accessibility.js"
must_contain: ["axe", "WCAG", "aria", "validate"]
description: "Accessibility validation script for timeline components"
- path: "scripts/benchmark-performance.js"
must_contain: ["benchmark", "10000", "render time", "memory"]
description: "Performance benchmarking for large timeline datasets"
- path: "tests/timelines/accessibility.test.tsx"
must_contain: ["axe", "toHaveNoViolations", "keyboard", "screen reader"]
description: "Accessibility compliance tests (axe-core, keyboard navigation)"
- path: "tests/timelines/performance.test.ts"
must_contain: ["benchmark", "render time", "1000+", "virtual"]
description: "Performance tests for large datasets with virtual scrolling"
- path: "docs/timeline-accessibility.md"
must_contain: ["WCAG", "ARIA", "keyboard", "screen reader"]
description: "Comprehensive accessibility documentation for timelines"
- path: "docs/realtime-patterns.md"
must_contain: ["WebSocket", "SSE", "optimistic", "batch"]
description: "Real-time update patterns and implementation guide"
frontend_framework:
react:
- path: "package.json"
must_contain: ["react-chrono"]
description: "React Chrono library for flexible timeline visualizations"
- path: "components/timelines/ReactChronoTimeline.tsx"
must_contain: ["Chrono", "items", "mode"]
description: "Timeline implementation using React Chrono"
- path: "hooks/useTimeline.ts"
must_contain: ["useState", "useEffect", "useMemo"]
description: "React hooks for timeline state management"
- path: "tsconfig.json"
must_contain: ["jsx", "react"]
description: "TypeScript configuration for React"
vue:
- path: "components/timelines/VueTimeline.vue"
must_contain: ["<template>", "<script setup>", "defineProps"]
description: "Vue 3 timeline component with script setup"
- path: "composables/useTimeline.ts"
must_contain: ["ref", "computed", "reactive"]
description: "Vue composable for timeline state management"
svelte:
- path: "components/timelines/SvelteTimeline.svelte"
must_contain: ["<script>", "export let", "$"]
description: "Svelte timeline component with reactive props"
- path: "stores/timelineStore.ts"
must_contain: ["writable", "derived", "subscribe"]
description: "Svelte store for timeline state management"
styling:
tailwind:
- path: "tailwind.config.js"
must_contain: ["theme:", "extend:", "colors:", "timeline"]
description: "Tailwind configuration with timeline-specific tokens"
- path: "components/timelines/VerticalTimeline.tsx"
must_contain: ["className", "flex", "border-l"]
description: "Timeline components styled with Tailwind utility classes"
- path: "styles/timeline.css"
must_contain: ["@tailwind", "@layer components"]
description: "Tailwind directives and custom timeline layers"
css_modules:
- path: "components/timelines/VerticalTimeline.module.css"
must_contain: [".timeline", ".event", ".marker", ".line"]
description: "CSS Modules for scoped timeline component styles"
- path: "components/timelines/VerticalTimeline.tsx"
must_contain: ["import styles from", "styles.timeline"]
description: "CSS Module imports in timeline components"
styled_components:
- path: "components/timelines/StyledTimeline.tsx"
must_contain: ["styled.", "props.theme", "css"]
description: "Styled-components for dynamic timeline styling"
- path: "theme/timelineTheme.ts"
must_contain: ["export const timelineTheme", "colors", "spacing"]
description: "Theme configuration for timeline styled-components"
design_tokens:
- path: "tokens/timeline-tokens.css"
must_contain: ["--timeline-line-color", "--timeline-dot-color", "--event-card-bg"]
description: "CSS custom properties for timeline theming"
- path: "components/timelines/"
must_contain: ["var(--timeline-"]
description: "Timeline components referencing design token variables"
timeline_type:
activity_feed:
- path: "components/timelines/SocialActivityFeed.tsx"
must_contain: ["avatar", "user", "action", "reaction", "comment"]
description: "Social activity feed with reactions and comments"
- path: "components/timelines/NotificationCenter.tsx"
must_contain: ["notification", "read", "unread", "mark all read", "dismiss"]
description: "Notification center with read/unread states and actions"
- path: "hooks/useInfiniteScroll.ts"
must_contain: ["infinite", "pagination", "hasMore", "fetchMore"]
description: "Infinite scroll hook for activity feeds"
gantt:
- path: "package.json"
must_contain: ["@svar/gantt"]
description: "SVAR React Gantt library for project management"
- path: "components/timelines/ProjectGantt.tsx"
must_contain: ["Gantt", "tasks", "dependencies", "milestones", "progress"]
description: "Gantt chart with dependencies, milestones, and progress tracking"
- path: "scripts/generate-gantt-data.py"
must_contain: ["generate", "tasks", "dependencies", "auto"]
description: "Script to generate realistic Gantt chart data"
calendar:
- path: "package.json"
must_contain: ["react-big-calendar"]
description: "React Big Calendar library for scheduling interfaces"
- path: "components/timelines/CalendarScheduler.tsx"
must_contain: ["Calendar", "month", "week", "day", "agenda", "onSelectEvent"]
description: "Full calendar scheduler with multiple view types"
- path: "utils/calendar-events.ts"
must_contain: ["event", "start", "end", "allDay", "resource"]
description: "Calendar event type definitions and utilities"
realtime_updates:
sse:
- path: "hooks/useSSE.ts"
must_contain: ["EventSource", "onmessage", "onerror", "close"]
description: "Server-Sent Events hook for real-time updates"
- path: "components/timelines/RealtimeFeed.tsx"
must_contain: ["useSSE", "new items", "auto-update"]
description: "Real-time activity feed using SSE"
websocket:
- path: "hooks/useWebSocket.ts"
must_contain: ["WebSocket", "reconnect", "heartbeat", "send", "receive"]
description: "WebSocket hook with reconnection logic and heartbeat"
- path: "components/timelines/LiveActivityFeed.tsx"
must_contain: ["useWebSocket", "optimistic", "batch"]
description: "Live activity feed with WebSocket updates"
polling:
- path: "hooks/useSmartPolling.ts"
must_contain: ["setInterval", "document.hidden", "pause", "resume"]
description: "Smart polling with tab visibility detection"
- path: "components/timelines/PollingFeed.tsx"
must_contain: ["useSmartPolling", "interval", "auto-refresh"]
description: "Activity feed with smart polling updates"
# Scaffolding files that should be created as starting points
scaffolding:
- path: "components/timelines/"
reason: "Directory for all timeline component implementations"
- path: "components/timelines/primitives/"
reason: "Reusable timeline primitive components (marker, line, event card)"
- path: "components/timelines/accessibility/"
reason: "Accessibility-focused timeline wrapper components"
- path: "utils/"
reason: "Utility functions for timestamp formatting, timezone handling, data processing"
- path: "utils/performance/"
reason: "Performance optimization utilities (virtual scrolling, batching, caching)"
- path: "hooks/"
reason: "React hooks for timeline functionality (real-time updates, virtual scrolling, filtering)"
- path: "types/timeline-data.ts"
reason: "TypeScript type definitions for timeline event structures"
- path: "data/"
reason: "Sample timeline datasets for development and testing"
- path: "scripts/"
reason: "Scripts for data generation, validation, and benchmarking"
- path: "tests/timelines/"
reason: "Unit tests, accessibility tests, and performance benchmarks"
- path: "docs/"
reason: "Documentation for timeline patterns, accessibility, and real-time updates"
- path: "styles/"
reason: "Timeline styles and CSS utilities"
- path: "tokens/"
reason: "Design tokens for timeline theming (CSS custom properties)"
- path: "package.json"
reason: "Initialize npm dependencies and scripts"
- path: "tsconfig.json"
reason: "TypeScript configuration"
- path: ".gitignore"
reason: "Ignore node_modules, build artifacts, and coverage reports"
# Metadata
metadata:
primary_blueprints: ["dashboard", "frontend"]
contributes_to:
- "Timeline components for chronological event display"
- "Activity feeds for social, notifications, and system events"
- "Gantt charts for project planning and scheduling"
- "Calendar interfaces for event management"
- "Real-time updates via WebSocket, SSE, or polling"
- "Accessibility compliance (WCAG 2.1 AA with ARIA patterns)"
- "Performance optimization for large datasets (virtual scrolling, batching)"
- "Responsive timeline designs for mobile and desktop"
- "Timestamp formatting (relative and absolute time)"
- "Interactive timelines with zoom, pan, and filtering"
timeline_types_covered:
- "Vertical Timeline (historical events, project milestones)"
- "Horizontal Timeline (project roadmaps, interactive exploration)"
- "Social Activity Feed (user actions, reactions, comments)"
- "Notification Feed (system notifications, read/unread states)"
- "Audit Log (system events, searchable, exportable)"
- "Gantt Chart (project tasks, dependencies, critical path)"
- "Calendar Interface (month/week/day views, event scheduling)"
- "Interactive Timeline (zoom, pan, filter, detail view)"
accessibility_features:
- "WCAG 2.1 AA compliance"
- "Semantic HTML (ordered/unordered lists for timelines)"
- "ARIA patterns (role=\"feed\", role=\"article\", aria-label, aria-busy)"
- "Keyboard navigation (Tab, Arrow keys, Enter/Space, skip controls)"
- "Screen reader support (descriptive timestamp labels, live announcements)"
- "Focus indicators for interactive elements"
- "Proper heading hierarchy"
- "Semantic time elements (<time datetime>)"
performance_strategies:
- "<100 events: Client-side rendering, no virtualization"
- "100-1,000 events: Virtual scrolling recommended"
- "1,000+ events: Virtual scrolling + server pagination"
- "Real-time updates: Debounce updates, batch insertions (500ms)"
- "Memoize timeline item components"
- "Lazy load event details"
- "Optimize timestamp calculations (update relative times every 60s)"
- "Smart polling with tab visibility detection (pause when hidden)"
integration_points:
design_tokens: "Uses design-tokens skill for theming (--timeline-line-color, --timeline-dot-color, --event-card-bg)"
data_viz: "May integrate chart components for sparklines in activity feeds"
forms: "Uses form components for filter inputs (date range, category selection)"
tables: "Audit logs may use table components for structured display"
feedback: "Uses feedback components for loading states and error messages"
realtime_sync: "Integrates with implementing-realtime-sync skill for WebSocket/SSE patterns"
common_patterns:
- name: "Relative vs Absolute Timestamps"
description: "Recent events use relative time ('2 hours ago'), older events use absolute ('Jan 15, 2025')"
files: ["utils/timestamp-formatting.ts"]
- name: "Infinite Scroll for Activity Feeds"
description: "Pagination with infinite scroll for social feeds and notifications"
files: ["hooks/useInfiniteScroll.ts", "components/timelines/ActivityFeed.tsx"]
- name: "Real-Time Optimistic Updates"
description: "Show user action immediately, rollback on error"
files: ["hooks/useOptimisticUpdate.ts", "components/timelines/RealtimeActivityFeed.tsx"]
- name: "Virtual Scrolling for Performance"
description: "Render only visible events for timelines with 1000+ items"
files: ["hooks/useVirtualScrolling.ts", "utils/performance/virtual-scrolling.ts"]
- name: "Batch Real-Time Updates"
description: "Debounce incoming events (500ms) to avoid overwhelming UI"
files: ["utils/performance/batch-updates.ts"]
- name: "Responsive Timeline Strategy"
description: "Horizontal timelines convert to vertical on mobile, simplified display"
files: ["components/timelines/ResponsiveTimeline.tsx"]
- name: "Design Token Integration"
description: "Timeline components reference CSS custom properties for theme switching"
files: ["tokens/timeline-tokens.css"]
anti_patterns:
- name: "No loading states for timelines"
avoid: "Timeline shows nothing while loading events"
use: "Skeleton loaders or spinners for better UX"
- name: "Continuous timestamp updates"
avoid: "Updating relative timestamps every second (causes re-renders)"
use: "Update every 60 seconds or on visibility change"
- name: "No virtualization for large datasets"
avoid: "Rendering all 10,000 events at once (slow, crashes browser)"
use: "Virtual scrolling for 1000+ events"
- name: "Unbatched real-time updates"
avoid: "Inserting each event immediately as it arrives"
use: "Debounce and batch updates (500ms) for performance"
- name: "Color-only event categorization"
avoid: "Using only color to distinguish event types"
use: "Combine color with icons or text labels for accessibility"
- name: "Missing timezone handling"
avoid: "Displaying server UTC times without conversion"
use: "Convert to user's local timezone for display"
- name: "No keyboard navigation"
avoid: "Timeline only navigable with mouse"
use: "Arrow keys for navigation, Tab for focus, Enter/Space for actions"
libraries:
timeline_visualization:
- name: "react-chrono"
use_when: "Flexible timeline visualizations with rich content support"
trust_score: "High"
install: "npm install react-chrono"
- name: "react-vertical-timeline-component"
use_when: "Simple, clean vertical timelines (lightweight ~10KB)"
trust_score: "High"
install: "npm install react-vertical-timeline-component"
gantt_charts:
- name: "@svar/gantt"
use_when: "Modern Gantt charts with drag-and-drop, dependencies, TypeScript support"
trust_score: "High"
install: "npm install @svar/gantt"
- name: "Bryntum Gantt"
use_when: "Enterprise-grade project management (commercial license required)"
trust_score: "High"
calendar:
- name: "react-big-calendar"
use_when: "Full calendar scheduler with month/week/day views, drag-and-drop"
trust_score: "High"
install: "npm install react-big-calendar"
- name: "FullCalendar"
use_when: "Premium calendar features, excellent documentation, multi-framework"
trust_score: "High"
validation_checks:
- "All timeline events have accessible timestamps (aria-label or <time> element)"
- "Timeline components have proper ARIA roles (feed, article)"
- "Keyboard navigation works (Tab, Arrow keys, Enter/Space)"
- "Screen reader announces new items in real-time feeds (aria-live)"
- "Virtual scrolling implemented for 1000+ events"
- "Real-time updates batched (500ms debounce) for performance"
- "Relative timestamps update automatically (every 60s)"
- "Timezone conversion to user's local time"
- "Responsive design for mobile (vertical stacking or horizontal scroll)"
- "Loading and error states for all timeline components"
typical_directory_structure: |
project/
├── components/
│ └── timelines/
│ ├── primitives/
│ │ ├── TimelineMarker.tsx # Event marker dot
│ │ ├── TimelineLine.tsx # Connecting line
│ │ └── EventCard.tsx # Event content card
│ ├── VerticalTimeline.tsx # Vertical timeline
│ ├── HorizontalTimeline.tsx # Horizontal timeline
│ ├── InteractiveTimeline.tsx # Zoom/pan/filter timeline
│ ├── ActivityFeed.tsx # Social activity feed
│ ├── NotificationFeed.tsx # Notification center
│ ├── AuditLogViewer.tsx # Audit log display
│ ├── GanttChart.tsx # Gantt chart
│ ├── CalendarScheduler.tsx # Calendar interface
│ ├── RealtimeActivityFeed.tsx # Real-time updates
│ ├── ResponsiveTimeline.tsx # Mobile-optimized
│ └── accessibility/
│ ├── TimelineA11y.tsx # ARIA wrapper
│ └── KeyboardNavigation.tsx # Keyboard controls
├── hooks/
│ ├── useTimeline.ts # Timeline state management
│ ├── useRealtimeUpdates.ts # Real-time update hook
│ ├── useWebSocket.ts # WebSocket connection
│ ├── useSSE.ts # Server-sent events
│ ├── useSmartPolling.ts # Smart polling with visibility
│ ├── useVirtualScrolling.ts # Virtual scrolling
│ ├── useOptimisticUpdate.ts # Optimistic updates
│ └── useInfiniteScroll.ts # Infinite scroll pagination
├── utils/
│ ├── timestamp-formatting.ts # Timestamp formatting
│ ├── timezone-handling.ts # Timezone conversion
│ ├── export-timeline.ts # Export utilities
│ └── performance/
│ ├── virtual-scrolling.ts # Virtual scroll implementation
│ └── batch-updates.ts # Batch update logic
├── types/
│ └── timeline-data.ts # TypeScript interfaces
├── data/
│ └── sample-timeline-data.ts # Sample datasets
├── scripts/
│ ├── generate-gantt-data.py # Gantt data generator
│ ├── validate-accessibility.js # A11y validation
│ ├── benchmark-performance.js # Performance benchmarks
│ └── simulate-realtime.js # Real-time test simulator
├── tests/
│ └── timelines/
│ ├── VerticalTimeline.test.tsx # Component tests
│ ├── accessibility.test.tsx # A11y tests
│ └── performance.test.ts # Performance tests
├── docs/
│ ├── timeline-accessibility.md # A11y documentation
│ └── realtime-patterns.md # Real-time patterns guide
├── styles/
│ └── timeline.css # Timeline base styles
├── tokens/
│ └── timeline-tokens.css # Design tokens
├── package.json # Dependencies
├── tsconfig.json # TypeScript config
└── README.md # Documentation
Timeline Accessibility Patterns
WCAG 2.1 AA compliance patterns for timelines and activity feeds.
Semantic HTML
[Proper structure with lists and time elements]
ARIA Attributes
[Live regions, roles, and labels]
Keyboard Navigation
[Complete keyboard support patterns]
Screen Reader Support
[Meaningful announcements and labels]
Activity Feed Patterns
Implementation patterns for social activity feeds including infinite scroll, reactions, and real-time updates.
Social Feed Architecture
[Detailed implementation patterns]
Infinite Scroll Implementation
[Progressive loading strategies]
Reaction Systems
[Like, comment, share patterns]
Audit Log Patterns
Security-focused audit log implementations with search, export, and precise timestamp tracking.
Audit Log Structure
[Log entry format and data model]
Search and Filtering
[Advanced search patterns for audit logs]
Export Functionality
[CSV and JSON export implementations]
Calendar Interface Patterns
Month, week, and day view implementations for scheduling interfaces.
Month View
[Grid layout and event display]
Week View
[Time slots and event blocks]
Day/Agenda View
[Detailed schedule view patterns]
Timeline Component Selection Framework
This reference provides detailed criteria for selecting the appropriate timeline component type based on use case, data characteristics, and requirements.
Decision Tree
[Detailed decision tree for component selection]
Use Case Analysis
[Comprehensive use case scenarios and recommendations]
Feature Comparison Matrix
[Comparison of features across component types]
Gantt Chart Patterns
Project planning Gantt chart implementations with dependencies, drag-and-drop, and resource allocation.
Task Bar Implementation
[Draggable and resizable task bars]
Dependency Lines
[Arrow rendering and critical path]
Resource Allocation
[Resource assignment and visualization]
Horizontal Timeline Patterns
Implementation patterns for horizontal timelines with scrolling, zoom, and density controls.
Scroll Implementation
[Touch and mouse scroll patterns]
Zoom Controls
[Zoom levels and density adjustment]
Responsive Adaptation
[Mobile-friendly horizontal timelines]
Interactive Timeline Patterns
Advanced interactive timelines with filtering, zooming, and detail views.
Interaction Patterns
[Click, hover, and keyboard interactions]
Filter Implementation
[Category and type-based filtering]
Detail Views
[Modal and slide-out detail panels]
Timeline Library Comparison
Detailed analysis of timeline, Gantt, and calendar libraries.
Timeline Libraries
| Library | Size | Features | Best For |
|---|---|---|---|
| react-chrono | ~50KB | Flexible layouts, media | Rich timelines |
| react-vertical-timeline | ~10KB | Simple vertical | Basic timelines |
Gantt Libraries
| Library | License | Features | Best For |
|---|---|---|---|
| SVAR React Gantt | MIT | Modern, dependency-free | Most projects |
| Bryntum Gantt | Commercial | Enterprise features | Large organizations |
Calendar Libraries
| Library | Size | Features | Best For |
|---|---|---|---|
| react-big-calendar | ~100KB | All views, customizable | General scheduling |
| FullCalendar | Varies | Premium features | Feature-rich needs |
Selection Criteria
[Detailed comparison and selection guidance]
Notification Feed Patterns
Implementation patterns for notification systems with read/unread states, grouping, and filtering.
Notification Grouping
[Date-based and type-based grouping strategies]
Read/Unread State Management
[State tracking and UI patterns]
Filtering and Categorization
[Filter implementation patterns]
Performance Optimization for Timelines
Optimization strategies for handling large datasets and real-time updates.
Virtual Scrolling
[Windowing implementation for large timelines]
Memoization
[React.memo and useMemo patterns]
Lazy Loading
[Progressive content loading strategies]
Real-Time Update Patterns
WebSocket and SSE implementations for live activity feeds and timeline updates.
WebSocket Connection
[Connection management and reconnection]
Optimistic Updates
[Immediate UI updates with rollback]
Batching and Debouncing
[Performance optimization for rapid updates]
Responsive Timeline Strategies
Mobile-optimized timeline implementations with adaptive layouts.
Vertical Stacking
[Convert horizontal to vertical for mobile]
Simplified Display
[Progressive disclosure for small screens]
Touch Interactions
[Swipe, pinch, and touch-optimized controls]
Timestamp Formatting Patterns
Comprehensive timestamp formatting strategies for relative and absolute times.
Relative Time
[Time-ago formatting with auto-refresh]
Absolute Time
[Locale-aware date formatting]
Timezone Handling
[User timezone detection and conversion]
Vertical Timeline Patterns
Implementation patterns for vertical timelines with connecting lines, markers, and alternating layouts.
Basic Structure
[HTML and CSS structure for vertical timelines]
Alternating Layout
[Left-right alternating event cards]
Marker Styles
[Dot, icon, and custom marker implementations]
#!/usr/bin/env node
/**
* Benchmark Timeline Performance Script
*
* Measures timeline rendering performance with:
* - Various event counts
* - Virtual scrolling vs full render
* - Memory usage tracking
* - FPS measurements
*
* Usage:
* node benchmark_timeline.js --events 10000 --virtual
*/
// Script implementation placeholder
#!/usr/bin/env node
/**
* Format Timestamps Script
*
* Formats timestamps consistently across timeline components with:
* - Locale-aware formatting
* - Timezone conversion
* - Relative vs absolute switching
*
* Usage:
* node format_timestamps.js --locale en-US --timezone auto
*/
// Script implementation placeholder
#!/usr/bin/env python3
"""
Generate Gantt Chart Data Script
Generates mock project data for Gantt chart implementations including:
- Tasks with start/end dates
- Dependencies between tasks
- Resource assignments
- Progress tracking
Usage:
python generate_gantt_data.py --tasks 50 --dependencies auto
"""
# Script implementation placeholder
# Full implementation to be added during skill expansion
#!/usr/bin/env python3
"""
Generate Timeline Data Script
Generates mock timeline/activity data for testing including:
- Events with timestamps
- User actions and system events
- Real-time simulation data
- Various event types
Usage:
python generate_timeline_data.py --events 500 --realtime
"""
# Script implementation placeholder
#!/usr/bin/env node
/**
* Simulate Real-time Updates Script
*
* Simulates real-time timeline updates for testing:
* - WebSocket event generation
* - Configurable event rate
* - Various event types
*
* Usage:
* node simulate_realtime.js --rate 5/sec --duration 60s
*/
// Script implementation placeholder
#!/usr/bin/env node
/**
* Validate Timeline Accessibility Script
*
* Validates timeline components against WCAG 2.1 AA:
* - Semantic HTML structure
* - ARIA attributes
* - Keyboard navigation
* - Screen reader support
*
* Usage:
* node validate_timeline_accessibility.js
*/
// Script implementation placeholder
Related skills
FAQ
Which component fits social activity vs system events?
Use an activity feed with infinite scroll for social activity, and a searchable, exportable audit log for system events.
How should timestamps be shown?
Use relative times for recent events and absolute or ISO 8601 for older events, with hover for the precise timestamp.