Animated Hero Section
Modern hero section with animated text, particle background, and call-to-action buttons, perfect for landing pages.
Responsive Design
Yes
Dark Mode Support
Yes
lines
411
Browser Compatibility
Chrome · Firefox · Safari · Edge
Live Preview
Interact with the component without leaving the page.
Overview
Modern hero section with animated text, particle background, and call-to-action buttons, perfect for landing pages.
How to use
- Copy the HTML markup into your page.
- Paste the CSS into your stylesheet and ensure the selectors match your markup.
- Paste the JavaScript and load it after the markup.
- Adjust spacing, colors, and text to match your design system.
Customization tips
- Rename class names to avoid collisions with your existing CSS.
- Replace hard-coded colors with CSS variables for theming.
- Verify the layout at 320px, 768px, and 1024px widths.
- Test dark mode with your preferred background and text colors.
HTML
46
lines
CSS
254
lines
JavaScript
111
lines
<section class="hero-section">
<div class="hero-background">
<div class="floating-shapes" aria-hidden="true">
<div class="shape shape-1"></div>
<div class="shape shape-2"></div>
<div class="shape shape-3"></div>
<div class="shape shape-4"></div>
<div class="shape shape-5"></div>
</div>
</div>
<div class="hero-content">
<div class="hero-text">
<h1 class="hero-title">
<span class="title-line">Build Amazing</span>
<span class="title-line highlight">Web Experiences</span>
</h1>
<p class="hero-subtitle">
Create stunning websites with modern design patterns and cutting-edge technologies
</p>
</div>
<div class="hero-actions">
<button class="cta-primary" type="button">Get Started</button>
<button class="cta-secondary" type="button" aria-label="Watch demo">
<span class="play-icon" aria-hidden="true">▶</span>
Watch Demo
</button>
</div>
<div class="hero-stats">
<div class="stat-item">
<span class="stat-number" data-target="10000">0</span>
<span class="stat-label">Happy Clients</span>
</div>
<div class="stat-item">
<span class="stat-number" data-target="500">0</span>
<span class="stat-label">Projects Done</span>
</div>
<div class="stat-item">
<span class="stat-number" data-target="50">0</span>
<span class="stat-label">Team Members</span>
</div>
</div>
</div>
</section>
Browser Compatibility
Chrome
>= 50
Firefox
>= 45
Safari
>= 10
Edge
>= 15