I'll create a glassmorphic floating tab bar with progressive blur effects. Here's a complete demo:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glassmorphic Tab Bar</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow-x: hidden;
}
/* Background elements for depth */
.background-shapes {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;
}
.shape {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: float 6s ease-in-out infinite;
}
.shape:nth-child(1) {
width: 200px;
height: 200px;
top: 20%;
left: 10%;
animation-delay: 0s;
}
.shape:nth-child(2) {
width: 150px;
height: 150px;
top: 60%;
right: 15%;
animation-delay: 2s;
}
.shape:nth-child(3) {
width: 100px;
height: 100px;
bottom: 20%;
left: 30%;
animation-delay: 4s;
}
@keyframes float {
0%, 100% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-20px) rotate(180deg); }
}
/* Main tab bar container */
.tab-bar-container {
position: relative;
padding: 20px;
}
.tab-bar {
position: relative;
display: flex;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 25px;
padding: 8px;
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-bar:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
box-shadow:
0 12px 40px rgba(0, 0, 0, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* Individual tab styling */
.tab {
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 12px 20px;
margin: 0 4px;
border-radius: 18px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
color: rgba(255, 255, 255, 0.7);
font-size: 12px;
font-weight: 500;
min-width: 70px;
backdrop-filter: blur(0px);
-webkit-backdrop-filter: blur(0px);
}
.tab:hover {
color: rgba(255, 255, 255, 0.9);
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
transform: translateY(-1px);
}
.tab.active {
color: white;
background: rgba(255, 255, 255, 0.25);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
box-shadow:
0 4px 20px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* Tab icons */
.tab-icon {
width: 24px;
height: 24px;
margin-bottom: 4px;
transition: all 0.3s ease;
opacity: 0.8;
}
.tab:hover .tab-icon,
.tab.active .tab-icon {
opacity: 1;
transform: scale(1.1);
}
/* Progressive blur indicator */
.blur-indicator {
position: absolute;
bottom: -40px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 8px;
align-items: center;
}
.blur-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
}
.blur-dot.active {
background: rgba(255, 255, 255, 0.8);
transform: scale(1.2);
}
/* Floating animation */
@keyframes tabFloat {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-3px); }
}
.tab-bar {
animation: tabFloat 4s ease-in-out infinite;
}
/* Responsive design */
@media (max-width: 480px) {
.tab {
min-width: 60px;
padding: 10px 16px;
font-size: 11px;
}
.tab-icon {
width: 20px;
height: 20px;
}
}
/* Content area for demonstration */
.content-area {
position: absolute;
top: 120px;
left: 50%;
transform: translateX(-50%);
width: 300px;
height: 200px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 20px;
padding: 20px;
color: white;
text-align: center;
opacity: 0;
transition: all 0.5s ease;
}
.content-area.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
</style>
</head>
<body>
<div class="background-shapes">
<div class="shape"></div>
<div class="shape"></div>
<div class="shape"></div>
</div>
<div class="tab-bar-container">
<div class="tab-bar">
<div class="tab active" data-tab="home">
<div class="tab-icon">🏠</div>
<span>Home</span>
</div>
<div class="tab" data-tab="search">
<div class="tab-icon">🔍</div>
<span>Search</span>
</div>
<div class="tab" data-tab="favorites">
<div class="tab-icon">❤️</div>
<span>Favorites</span>
</div>
<div class="tab" data-tab="profile">
<div class="tab-icon">👤</div>
<span>Profile</span>
</div>
<div class="tab" data-tab="settings">
<div class="tab-icon">⚙️</div>
<span>Settings</span>
</div>
</div>
<div class="blur-indicator">
<div class="blur-dot active"></div>
<div class="blur-dot"></div>
<div class="blur-dot"></div>
</div>
</div>
<div class="content-area" id="contentArea">
<h3 id="contentTitle">Home</h3>
<p id="contentText">Welcome to the Home section. This glassmorphic tab bar features progressive blur effects.</p>
</div>
<script>
const tabs = document.querySelectorAll('.tab');
const blurDots = document.querySelectorAll('.blur-dot');
const contentArea = document.getElementById('contentArea');
const contentTitle = document.getElementById('contentTitle');
const contentText = document.getElementById('contentText');
const contentData = {
home: {
title: 'Home',
text: 'Welcome to the Home section. This glassmorphic tab bar features progressive blur effects.'
},
search: {
title: 'Search',
text: 'Search through your content with advanced filtering and progressive blur enhancement.'
},
favorites: {
title: 'Favorites',
text: 'Your favorite items are stored here with beautiful glassmorphic styling.'
},
profile: {
title: 'Profile',
text: 'Manage your profile settings with this elegant floating interface.'
},
settings: {
title: 'Settings',
text: 'Configure your preferences with progressive blur visual feedback.'
}
};
let currentBlurLevel = 0;
tabs.forEach((tab, index) => {
tab.addEventListener('click', () => {
// Remove active class from all tabs
tabs.forEach(t => t.classList.remove('active'));
// Add active class to clicked tab
tab.classList.add('active');
// Update blur level based on tab position
updateBlurLevel(index);
// Update content
const tabData = tab.getAttribute('data-tab');
updateContent(tabData);
});
// Add hover effect for progressive blur
tab.addEventListener('mouseenter', () => {
if (!tab.classList.contains('active')) {
tab.style.backdropFilter = `blur(${5 + index * 2}px)`;
tab.style.webkitBackdropFilter = `blur(${5 + index * 2}px)`;
}
});
tab.addEventListener('mouseleave', () => {
if (!tab.classList.contains('active')) {
tab.style.backdropFilter = 'blur(0px)';
tab.style.webkitBackdropFilter = 'blur(0px)';
}
});
});
function updateBlurLevel(level) {
currentBlurLevel = level;
// Update blur dots
blurDots.forEach((dot, index) => {
dot.classList.toggle('active', index <= Math.floor(level / 2));
});
// Apply progressive blur to active tab
const activeTab = document.querySelector('.tab.active');
const blurAmount = 15 + (level * 3);
activeTab.style.backdropFilter = `blur(${blurAmount}px)`;
activeTab.style.webkitBackdropFilter = `blur(${blurAmount}px)`;
}
function updateContent(tabName) {
contentArea.classList.remove('show');
setTimeout(() => {
contentTitle.textContent = contentData[tabName].title;
contentText.textContent = contentData[tabName].text;
contentArea.classList.add('show');
}, 250);
}
// Initialize content
updateContent('home');
setTimeout(() => {
contentArea.classList.add('show');
}, 500);
// Add dynamic blur effect on scroll (if page has scroll)
let ticking = false;
function updateTabBarBlur() {
const scrollY = window.scrollY;
const tabBar = document.querySelector('.tab-bar');
const additionalBlur = Math.min(scrollY / 10, 10);
tabBar.style.backdropFilter = `blur(${20 + additionalBlur}px)`;
tabBar.style.webkitBackdropFilter = `blur(${20 + additionalBlur}px)`;
ticking = false;
}
window.addEventListener('scroll', () => {
if (!ticking) {
requestAnimationFrame(updateTabBarBlur);
ticking = true;
}
});
</script>
</body>
</html>
This glassmorphic floating tab bar demo includes:
Key Features:
- Progressive Blur: Each tab has increasing blur intensity based on its position and state
- Glassmorphic Design: Semi-transparent backgrounds with backdrop-filter blur effects
- Floating Animation: Subtle floating motion with hover interactions
- Interactive States: Active, hover, and default states with smooth transitions
- Responsive Design: Adapts to different screen sizes
- Visual Feedback: Blur level indicators and content updates
Progressive Blur Implementation:
- Base blur of 20px on the container
- Individual tabs start with 0px blur and increase on hover/active states
- Active tab gets 15px + (position × 3px) blur
- Scroll-based blur enhancement for additional depth
- Visual blur indicators show current intensity level
Glassmorphic Elements:
- Semi-transparent backgrounds with rgba values
- Backdrop-filter and -webkit-backdrop-filter for cross-browser support
- Subtle borders and inset highlights
- Layered box-shadows for depth
- Smooth cubic-bezier transitions
The demo is fully interactive - click tabs to see the progressive blur effects and content changes. The floating animation and hover states provide additional visual polish typical of modern glassmorphic interfaces.