Interactive Timeline
Modern interactive timeline component with smooth animations, hover effects, and responsive design. Perfect for showcasing company history, project milestones, or chronological events.
Responsive Design
Yes
Dark Mode Support
Yes
lines
1085
Browser Compatibility
No
Live Preview
Interact with the component without leaving the page.
Interactive Timeline
A modern, interactive timeline component with smooth animations, hover effects, and responsive design. Perfect for showcasing company history, project milestones, product roadmaps, or any chronological events with engaging visual storytelling.
Features
- Smooth Animations: Intersection Observer API for performance-optimized scroll animations
- Interactive Elements: Hover effects, click interactions, and keyboard navigation
- Progress Visualization: Dynamic progress line that fills as user scrolls
- Responsive Design: Adaptive layout for all screen sizes with mobile-first approach
- Accessibility: Full keyboard navigation, ARIA labels, and screen reader support
- Glassmorphism Design: Modern frosted glass aesthetic with backdrop blur effects
- Performance Optimized: Throttled scroll events and efficient DOM manipulation
Navigation Options
- Scroll-based Animation: Items animate into view as user scrolls
- Keyboard Navigation: Arrow keys, Home/End, Enter/Space for interaction
- Click Interactions: Click timeline items for highlighting and focus
- Smooth Scrolling: Animated scroll-to-top and internal link navigation
- Progress Tracking: Visual progress line shows completion status
Customization Features
- Dynamic Content: Add/remove timeline items programmatically
- Custom Icons: SVG icons for each timeline marker
- Flexible Data: Support for stats, achievements, and rich content
- Animation Timing: Configurable animation delays and durations
- Visual Themes: Customizable colors, gradients, and styling
Performance Optimizations
- Intersection Observer for efficient scroll detection
- RequestAnimationFrame for smooth animations
- Throttled scroll and resize event handlers
- Lazy loading of timeline item animations
- Memory leak prevention with proper cleanup
API Methods
const timeline = new InteractiveTimeline();
// Navigation methods
timeline.scrollToItem(2); // Scroll to specific timeline item
timeline.focusTimelineItem(1); // Focus timeline item with keyboard
timeline.highlightTimelineItem(item); // Highlight specific item
// Content management
timeline.addTimelineItem(itemData); // Add new timeline item
timeline.removeTimelineItem(1); // Remove item by index
// Information methods
timeline.getVisibleItems(); // Get currently visible items
timeline.getPerformanceMetrics(); // Get performance data
// Utility methods
timeline.smoothScrollTo(position, duration); // Smooth scroll to position
timeline.updateLayout(); // Recalculate layout
timeline.destroy(); // Clean up and remove listenersTimeline Item Structure
// Create custom timeline item
const timelineItem = {
year: '2024',
date: 'March 2024',
title: 'Major Milestone',
description: 'Detailed description of the milestone...',
icon: '<svg>...</svg>', // Custom SVG icon
stats: [
{ number: '100K', label: 'Users' },
{ number: '50', label: 'Countries' }
],
achievements: [
'๐ Product Launch',
'๐ Global Expansion',
'โญ Industry Award'
]
};
timeline.addTimelineItem(timelineItem);CSS Customization
/* Custom color scheme */
.timeline-container {
background: linear-gradient(135deg, your-color-1, your-color-2);
}
/* Custom marker styling */
.marker-icon {
background: linear-gradient(135deg, your-primary, your-secondary);
border-color: your-accent-color;
}
/* Custom animation timing */
.timeline-item {
transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* Custom card styling */
.timeline-card {
background: rgba(your-color, 0.1);
border-color: rgba(your-color, 0.2);
}Accessibility Features
- Keyboard Navigation: Full keyboard accessibility with arrow keys
- ARIA Labels: Proper labeling for screen readers
- Focus Management: Logical tab order and focus indicators
- Reduced Motion: Respects userโs motion preferences
- High Contrast: Compatible with high contrast modes
- Screen Reader: Semantic HTML structure for assistive technology
Browser Support
- Chrome 60+ (full support)
- Firefox 55+ (full support)
- Safari 12+ (full support)
- Edge 79+ (full support)
- iOS Safari 12+ (full support)
- Android Chrome 60+ (full support)
Use Cases
- Company History: Showcase business milestones and growth
- Product Roadmap: Display development timeline and future plans
- Project Timeline: Track project phases and deliverables
- Personal Portfolio: Highlight career achievements and education
- Event History: Document important events and dates
- Process Visualization: Show step-by-step workflows
Integration Examples
<!-- Basic timeline item structure -->
<div class="timeline-item" data-year="2024">
<div class="timeline-marker">
<div class="marker-icon">
<!-- Custom SVG icon -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="..." stroke="currentColor" stroke-width="2"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">March 2024</span>
<h3 class="timeline-event-title">Event Title</h3>
</div>
<div class="card-body">
<p class="timeline-description">Event description...</p>
<!-- Optional stats -->
<div class="timeline-stats">
<div class="stat-item">
<span class="stat-number">100K</span>
<span class="stat-label">Users</span>
</div>
</div>
<!-- Optional achievements -->
<div class="timeline-achievements">
<span class="achievement-badge">๐ Achievement</span>
</div>
</div>
</div>
</div>
</div>Advanced Configuration
// Advanced timeline setup
const timeline = new InteractiveTimeline({
container: '.custom-timeline',
observerOptions: {
threshold: 0.3,
rootMargin: '0px 0px -50px 0px'
},
animationDuration: 800,
progressLineGradient: {
active: 'rgba(255, 255, 255, 0.8)',
inactive: 'rgba(255, 255, 255, 0.3)'
}
});HTML
212
lines
CSS
404
lines
JavaScript
469
lines
<div class="timeline-container">
<div class="timeline-header">
<h2 class="timeline-title">Our Journey</h2>
<p class="timeline-subtitle">Milestones that shaped our story</p>
</div>
<div class="timeline-wrapper">
<div class="timeline-line" id="timelineLine"></div>
<!-- Timeline Item 1 -->
<div class="timeline-item" data-year="2020">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M13 2L3 14H12L11 22L21 10H12L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">January 2020</span>
<h3 class="timeline-event-title">Company Founded</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Started our journey with a vision to revolutionize the tech industry. Founded by a team of passionate developers and designers committed to creating innovative solutions.
</p>
<div class="timeline-stats">
<div class="stat-item">
<span class="stat-number">3</span>
<span class="stat-label">Founders</span>
</div>
<div class="stat-item">
<span class="stat-number">\$50K</span>
<span class="stat-label">Initial Investment</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Item 2 -->
<div class="timeline-item" data-year="2020">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M16 21V5A2 2 0 0 0 14 3H10A2 2 0 0 0 8 5V21L12 19L16 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">June 2020</span>
<h3 class="timeline-event-title">First Product Launch</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Launched our flagship product after months of development and testing. The product received overwhelming positive feedback from early adopters and beta testers.
</p>
<div class="timeline-achievements">
<span class="achievement-badge">๐ Product Launch</span>
<span class="achievement-badge">๐ฅ 100+ Beta Users</span>
<span class="achievement-badge">โญ 4.8/5 Rating</span>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Item 3 -->
<div class="timeline-item" data-year="2021">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M17 21V13H7V21M7 3V8H15M19 21H5A2 2 0 0 1 3 19V5A2 2 0 0 1 5 3H19A2 2 0 0 1 21 5V19A2 2 0 0 1 19 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">March 2021</span>
<h3 class="timeline-event-title">Series A Funding</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Secured Series A funding to accelerate growth and expand our team. This milestone enabled us to scale operations and invest in cutting-edge technology.
</p>
<div class="timeline-stats">
<div class="stat-item">
<span class="stat-number">\$2M</span>
<span class="stat-label">Funding Raised</span>
</div>
<div class="stat-item">
<span class="stat-number">15</span>
<span class="stat-label">Team Members</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Item 4 -->
<div class="timeline-item" data-year="2022">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M12 2L15.09 8.26L22 9L17 14L18.18 21L12 17.77L5.82 21L7 14L2 9L8.91 8.26L12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">September 2022</span>
<h3 class="timeline-event-title">Industry Recognition</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Received multiple industry awards and recognition for innovation and excellence. Our product was featured in major tech publications and conferences.
</p>
<div class="timeline-achievements">
<span class="achievement-badge">๐ Tech Innovation Award</span>
<span class="achievement-badge">๐ฐ Featured in TechCrunch</span>
<span class="achievement-badge">๐ค Keynote Speaker</span>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Item 5 -->
<div class="timeline-item" data-year="2023">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M21 16V8A2 2 0 0 0 19 6H5A2 2 0 0 0 3 8V16A2 2 0 0 0 5 18H19A2 2 0 0 0 21 16Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7 10H17M7 14H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">December 2023</span>
<h3 class="timeline-event-title">Global Expansion</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Expanded operations globally with offices in three continents. Reached significant user milestones and established partnerships with major corporations.
</p>
<div class="timeline-stats">
<div class="stat-item">
<span class="stat-number">50K+</span>
<span class="stat-label">Active Users</span>
</div>
<div class="stat-item">
<span class="stat-number">25</span>
<span class="stat-label">Countries</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Item 6 -->
<div class="timeline-item" data-year="2024">
<div class="timeline-marker">
<div class="marker-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 17L12 22L22 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 12L12 17L22 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>
<div class="timeline-content">
<div class="timeline-card">
<div class="card-header">
<span class="timeline-date">Present</span>
<h3 class="timeline-event-title">Future Vision</h3>
</div>
<div class="card-body">
<p class="timeline-description">
Continuing to innovate and push boundaries in technology. Working on next-generation solutions that will shape the future of our industry.
</p>
<div class="timeline-achievements">
<span class="achievement-badge">๐ฎ AI Integration</span>
<span class="achievement-badge">๐ฑ Sustainability Focus</span>
<span class="achievement-badge">๐ Next-Gen Platform</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Timeline Navigation -->
<div class="timeline-navigation">
<button class="nav-btn" id="scrollToTop">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
<path d="M18 15L12 9L6 15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
Back to Top
</button>
</div>
</div>