Directory
- Welcome
SideBar Component
The SideBar component creates a scrollable vertical panel that’s perfect for navigation menus, filters, or supplementary content. It automatically adjusts to your viewport height and maintains accessibility.
Key Features
-
Responsive Design: Automatically adapts to viewport height
-
Custom Scrolling: Smooth scrollbar for overflow content
-
Flexible Positioning: Left or right side placement
-
Sticky Behavior: Maintains position while scrolling
Basic Usage
Create a basic sidebar with navigation:
<SideBar side="left"> <nav> <ul class="space-y-2"> <li>Home</li> <li>About</li> <li>Contact</li> </ul> </nav></SideBar>
Sidebar Component Props API
Prop | Type | Default | Description |
---|---|---|---|
side | 'left' | 'right' | left | Position of the sidebar |
wrapperClass | string | Classes for the inner wrapper |
Common Use Cases
Limited Time Launch Sale
Build responsive layouts in minutes with our AstroJS starter template. Get the SideBar component and many more UI components ready to use in your next project.
GET 60% OFF!