Jumbotron
Jumbotrons are large hero sections designed to showcase key content, announcements, or calls-to-action. They're perfect for landing pages, marketing content, and feature highlights. Domma's Jumbotron is a CSS-only component requiring no JavaScript.
Key Features
- CSS-Only - No JavaScript required
- Theme Variants - Default, dark, and primary gradient
- Background Images - Support for hero images with overlay
- Size Options - Small, default, and large padding
- Flexible Layout - Left-aligned or centred content
- Responsive - Mobile-optimised typography and spacing
Basic Usage
<div class="jumbotron">
<div class="jumbotron-content">
<h1 class="jumbotron-title">Welcome</h1>
<p class="jumbotron-subtitle">Subtitle text</p>
<div class="jumbotron-actions">
<button class="btn btn-primary btn-lg">Get Started</button>
</div>
</div>
</div>
Quick Start
Basic Jumbotron
Hello, World!
Simple hero section for featured content
Examples
Primary Gradient (Centred)
Launch Your Project
Build amazing applications with Domma
Dark Theme
Dark Mode Ready
Beautiful dark theme variant
With Background Image
Size Variants
Small Jumbotron
Compact version with less padding
Large Jumbotron
Expanded version with extra padding
Split Layouts (New)
Create modern text + image hero sections with CSS Grid. Split layouts automatically stack on mobile and display side-by-side on desktop (768px+).
Basic Split (50/50)
Modern Hero Layout
Split layouts combine compelling copy with visual content for maximum impact.
Reversed Split
Image on Left
Use .jumbotron-split-reverse to swap the visual and text positions.
Asymmetric Splits
60/40 Split
Give more emphasis to your content with asymmetric layouts.
70/30 Split
Perfect for content-heavy heroes with small visual accents.
Enhanced Overlays (New)
Multiple overlay variants for better contrast control on background images. Choose light overlays for dark images, dark overlays for bright images, or gradient overlays for fade effects.
Light Overlay
Dark Overlay
Darker Overlay
Gradient Overlay (Bottom-Up)
Gradient Overlay (Top-Down)
Announcement Badges (New)
Small notification badges to highlight announcements, new releases, or special features above your main hero heading.
Primary Badge
Domma v2.0
Enhanced Jumbotron with Tailwind-inspired utilities
Badge with Icon
Split Layouts & More
Build modern hero sections with ease
Badge Variants
Badge Color Variants
Choose from multiple semantic colors
Responsive Utilities (New)
Advanced responsive behaviors using CSS clamp for fluid typography and conditional display utilities for mobile/desktop content.
Responsive Typography
Fluid Typography
Scales smoothly from mobile (2rem) to desktop (3.5rem) without breakpoints using CSS clamp
Resize browser window to see fluid scaling in action
Conditional Display
Device-Specific Content
Show/hide elements based on viewport width
.jumbotron-hide-mobile hides below 768px, .jumbotron-show-mobile shows below 768px
Additional Gradients (New)
8 modern gradient backgrounds beyond the default primary gradient, perfect for creating visually stunning hero sections.
Purple Gradient
.jumbotron-gradient-purple
Blue Gradient
.jumbotron-gradient-blue
Green Gradient
.jumbotron-gradient-green
Sunset Gradient
.jumbotron-gradient-sunset
Ocean Gradient
.jumbotron-gradient-ocean
Rose Gradient
.jumbotron-gradient-rose
Forest Gradient
.jumbotron-gradient-forest
Night Gradient
.jumbotron-gradient-night
Best Practices
- Above the Fold - Place jumbotrons at top of page for maximum impact
- Clear CTA - Include obvious call-to-action buttons
- Contrast - Ensure text is readable against background (4.5:1 ratio minimum)
- Mobile Responsive - Test on mobile devices for proper text sizing
- Image Optimisation - Compress background images for fast loading
CSS Classes
| Class | Description |
|---|---|
.jumbotron |
Base jumbotron container |
.jumbotron-primary |
Primary colour gradient background |
.jumbotron-dark |
Dark background theme |
.jumbotron-center |
Centre-aligned content |
.jumbotron-cover |
Background image cover mode |
.jumbotron-overlay |
Dark overlay for background images |
.jumbotron-sm |
Smaller padding |
.jumbotron-lg |
Larger padding |
.jumbotron-content |
Content wrapper |
.jumbotron-title |
Main heading |
.jumbotron-subtitle |
Subtitle text |
.jumbotron-actions |
Button container |
| Split Layouts (New) | |
.jumbotron-split |
Text + image split layout (50/50 on desktop, stacked on mobile) |
.jumbotron-split-reverse |
Reversed split (image left, text right) |
.jumbotron-split-60-40 |
Asymmetric 60% / 40% split |
.jumbotron-split-70-30 |
Asymmetric 70% / 30% split |
.jumbotron-split-40-60 |
Asymmetric 40% / 60% split |
.jumbotron-split-30-70 |
Asymmetric 30% / 70% split |
.jumbotron-text |
Text content container for split layouts |
.jumbotron-media |
Image/media container for split layouts |
| Enhanced Overlays (New) | |
.jumbotron-overlay-light |
30% white overlay for dark backgrounds |
.jumbotron-overlay-dark |
60% black overlay for bright backgrounds |
.jumbotron-overlay-darker |
80% black overlay for maximum contrast |
.jumbotron-overlay-gradient |
Gradient overlay (dark bottom to transparent top) |
.jumbotron-overlay-gradient-reverse |
Gradient overlay (dark top to transparent bottom) |
| Announcement Badges (New) | |
.jumbotron-badge |
Primary badge (default blue) |
.jumbotron-badge-secondary |
Secondary badge variant |
.jumbotron-badge-success |
Success badge (green) |
.jumbotron-badge-warning |
Warning badge (yellow) |
.jumbotron-badge-danger |
Danger badge (red) |
.jumbotron-badge-info |
Info badge (cyan) |
.jumbotron-badge-outline |
Transparent badge with border |
.jumbotron-badge-icon |
Icon/emoji wrapper for badges |
| Responsive Utilities (New) | |
.jumbotron-title-responsive |
Fluid title sizing (2rem to 3.5rem) |
.jumbotron-subtitle-responsive |
Fluid subtitle sizing (1rem to 1.5rem) |
.jumbotron-responsive |
Fluid spacing (padding scales with viewport) |
.jumbotron-hide-mobile |
Hidden on mobile (<768px), visible on desktop |
.jumbotron-show-mobile |
Visible on mobile, hidden on desktop |
.jumbotron-center-mobile |
Centred on mobile, left-aligned on desktop |
| Gradient Variants (New) | |
.jumbotron-gradient-purple |
Purple gradient background |
.jumbotron-gradient-blue |
Blue gradient background |
.jumbotron-gradient-green |
Green gradient background |
.jumbotron-gradient-sunset |
Orange-to-red gradient background |
.jumbotron-gradient-ocean |
Cyan-blue gradient background |
.jumbotron-gradient-rose |
Pink-red gradient background |
.jumbotron-gradient-forest |
Green forest gradient background |
.jumbotron-gradient-night |
Dark slate gradient background |
Hybrid CSS + JavaScript
While jumbotrons work perfectly as CSS-only components, you can enhance them with JavaScript for dynamic content, animations, and interactivity using Domma's declarative configuration.
Dynamic Content Updates
// Rotate through multiple messages
$.setup({
'#hero-jumbotron': {
initial: {
data: {
messages: [
{ title: 'Launch Your Project', subtitle: 'Build amazing apps with Domma' },
{ title: 'Ship Faster', subtitle: 'Zero dependencies, maximum productivity' },
{ title: 'Scale Confidently', subtitle: 'Lightweight and performant' }
],
currentIndex: 0
}
},
events: {
ready: (e, $el) => {
const data = $el.data();
setInterval(() => {
data.currentIndex = (data.currentIndex + 1) % data.messages.length;
const msg = data.messages[data.currentIndex];
$el.find('.jumbotron-title').fadeOut(300, function() {
$(this).text(msg.title).fadeIn(300);
});
$el.find('.jumbotron-subtitle').fadeOut(300, function() {
$(this).text(msg.subtitle).fadeIn(300);
});
}, 4000);
}
}
}
});
Scroll-Based Animations
// Animate jumbotron on scroll into view
$.setup({
'.jumbotron': {
initial: {
css: { opacity: 0, transform: 'translateY(30px)' }
},
events: {
ready: (e, $el) => {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
$el.animate({
opacity: 1,
transform: 'translateY(0)'
}, 800);
observer.unobserve(entry.target);
}
});
});
observer.observe($el.get(0));
}
}
}
});
Interactive CTA Tracking
// Track user interactions with analytics
$.setup({
'#marketing-hero': {
events: {
'click .btn-primary': (e, $el) => {
const title = $el.find('.jumbotron-title').text();
// Track with analytics
if (typeof analytics !== 'undefined') {
analytics.track('Jumbotron CTA Clicked', {
hero: title,
button: $(e.target).text()
});
}
// Show feedback
Domma.elements.toast.success('Thanks for your interest!');
},
'mouseenter': (e, $el) => {
$el.find('.jumbotron-actions .btn').addClass('pulse');
},
'mouseleave': (e, $el) => {
$el.find('.jumbotron-actions .btn').removeClass('pulse');
}
}
}
});
Personalised Content
// Customise jumbotron based on user data
const user = { name: 'Alice', plan: 'Pro' };
$.setup({
'#dashboard-hero': {
initial: {
html: (el) => {
const $content = $(el).find('.jumbotron-content');
$content.find('.jumbotron-title').text(`Welcome back, ${user.name}!`);
$content.find('.jumbotron-subtitle').text(`You're on the ${user.plan} plan`);
if (user.plan === 'Free') {
$content.find('.jumbotron-actions').html(`
<button class="btn btn-primary btn-lg">Upgrade to Pro</button>
`);
}
}
}
}
});
Benefits of Hybrid Approach
- Performance - CSS handles layout/styling instantly, JS adds interactivity only when needed
- Progressive Enhancement - Works without JS, enhanced with JS
- Maintainability - Centralised configuration for all dynamic behaviour
- Flexibility - Mix static and dynamic content as needed
CSS-Only vs CSS+JS Hybrid
CSS-Only (Default)
Static Title
Static subtitle
CSS+JS Hybrid (Enhanced)
Dynamic Title
Dynamic subtitle