interactive
intermediate
timeline
interactive
milestones
history
chronological
Category · Interactive Difficulty Level · Intermediate Published on · January 22, 2024

Interactive Timeline

Modern interactive timeline component with smooth animations, hover effects, and responsive design. Perfect for showcasing company history, project milestones, or chronological events.

#timeline #interactive #milestones #history #chronological

Responsive Design

Yes

Dark Mode Support

Yes

lines

1041

Browser Compatibility

No

Live Preview

Interact with the component without leaving the page.

600px

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
  • 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();

timeline.scrollToItem(2);           // Scroll to specific timeline item
timeline.focusTimelineItem(1);      // Focus timeline item with keyboard
timeline.highlightTimelineItem(item); // Highlight specific item

timeline.addTimelineItem(itemData); // Add new timeline item
timeline.removeTimelineItem(1);     // Remove item by index

timeline.getVisibleItems();         // Get currently visible items
timeline.getPerformanceMetrics();   // Get performance data

timeline.smoothScrollTo(position, duration); // Smooth scroll to position
timeline.updateLayout();            // Recalculate layout
timeline.destroy();                 // Clean up and remove listeners

Timeline Item Structure


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

.timeline-container {
  background: linear-gradient(135deg, your-color-1, your-color-2);
}.marker-icon {
  background: linear-gradient(135deg, your-primary, your-secondary);
  border-color: your-accent-color;
}.timeline-item {
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}.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


<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="..." 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>
        
        <div class="timeline-stats">
          <div class="stat-item">
            <span class="stat-number">100K</span>
            <span class="stat-label">Users</span>
          </div>
        </div>
        
        <div class="timeline-achievements">
          <span class="achievement-badge">๐ŸŽ‰ Achievement</span>
        </div>
      </div>
    </div>
  </div>
</div>

Advanced Configuration


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

392

lines

JavaScript

437

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>
    
    
    <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>
    
    
    <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>
    
    
    <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>
    
    
    <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>
    
    
    <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>
    
    
    <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>
  
  
  <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>

              
212lines
9039characters
HTMLLanguage

Related Code Snippets

Explore template packs

Need larger building blocks? Browse responsive landing pages and component bundles.

Open HTML Template Library ->