Vertical Sidebar Menu
A sleek vertical sidebar navigation menu with smooth animations and collapsible functionality, perfect for admin dashboards and modern web applications.
Responsive Design
Yes
Dark Mode Support
No
lines
391
Browser Compatibility
No
Live Preview
Interact with the component without leaving the page.
Vertical Sidebar Menu
A modern, collapsible sidebar navigation perfect for admin dashboards and web applications. Features smooth animations, active states, and responsive design.
Features
- Collapsible Design: Toggle between expanded and collapsed states
- Smooth Animations: CSS transitions for all interactions
- Active States: Visual feedback for current page/section
- User Profile Section: Integrated user information display
- Responsive: Adapts to mobile screens
- Icon Support: Easy to customize with your preferred icons
Key Components
Sidebar Header
- Logo/brand area with icon and text
- Toggle button for collapse/expand functionality
- Smooth transition animations
Navigation Menu
- Icon-based navigation items
- Hover effects and active states
- Gradient backgrounds for active items
- Smooth slide animations
User Profile Footer
- User avatar and information
- Collapsible user details
- Professional styling
Customization Options
- Colors: Modify background gradients and accent colors
- Icons: Replace emoji icons with Font Awesome or custom icons
- Width: Adjust sidebar width and collapsed width
- Animation Speed: Customize transition durations
- Typography: Change fonts and text sizes
Usage Tips
- Replace emoji icons with your preferred icon library
- Add tooltips for collapsed state navigation
- Implement proper routing for navigation links
- Consider adding sub-menus for complex navigation structures
- Add loading states for dynamic content
Browser Support
Works in all modern browsers. Uses CSS Grid, Flexbox, and CSS custom properties for optimal performance and maintainability.
HTML
70
lines
CSS
236
lines
JavaScript
85
lines
<div class="sidebar-demo">
<div class="sidebar" id="sidebar">
<div class="sidebar-header">
<div class="logo">
<span class="logo-icon">π</span>
<span class="logo-text">Dashboard</span>
</div>
<button class="toggle-btn" id="toggleBtn">
<span class="toggle-icon">βΉ</span>
</button>
</div>
<nav class="sidebar-nav">
<ul class="nav-list">
<li class="nav-item active">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">π </span>
<span class="nav-text">Dashboard</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">π₯</span>
<span class="nav-text">Users</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">π</span>
<span class="nav-text">Analytics</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">βοΈ</span>
<span class="nav-text">Settings</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">π</span>
<span class="nav-text">Reports</span>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link" onclick="return false;">
<span class="nav-icon">π¬</span>
<span class="nav-text">Messages</span>
</a>
</li>
</ul>
</nav>
<div class="sidebar-footer">
<div class="user-profile">
<div class="user-avatar">π€</div>
<div class="user-info">
<span class="user-name">John Doe</span>
<span class="user-role">Admin</span>
</div>
</div>
</div>
</div>
<div class="main-content">
<h2>Sidebar Navigation Demo</h2>
<p>Click the toggle button (βΉ) to collapse/expand the sidebar.</p>
<p>Try clicking on different menu items to see the active state changes.</p>
</div>
</div>