Import
Usage
Props
Position of the sidebar. Defaults to
left. Determines which side border is shown.Enables floating mode (currently unused in implementation but reserved for future use).
Object-based class names for conditional styling.
All standard HTML aside attributes are supported (except standard
class).Slots
Content displayed at the top of the sidebar with a bottom border separator. Typically used for a heading or logo.
Main sidebar content. Usually contains navigation links or a table of contents.
Examples
Behavior
The sidebar is hidden on screens smaller than
lg (1024px) using hidden lg:flex. It becomes sticky when scrolling with sticky positioning and top-0. The sidebar has a height of 100dvh (dynamic viewport height) to fill the screen.Layout Details
- Responsive: Hidden on mobile/tablet, visible on
lg+screens - Sticky: Stays in viewport when scrolling (
sticky top-0) - Z-index: Set to 40 for proper layering
- Padding:
px-6horizontal,pt-20top (leaves space for fixed nav),pb-0bottom - Border: Right border for left position, left border for right position
- ID: Inner nav has
id="docs-sidebar"for anchor linking
Styling
- Uses
lum-cardstyling for consistent theming - Title area has subtle bottom border (
border-lum-border/10) - Content area has gap spacing and responsive margins
- Rounded corners removed with
rounded-none - Minimum height on inner nav ensures proper layout
Accessibility
- Semantic
<aside>element for landmark navigation - Inner
<nav>element with ID for skip links - Title slot uses flex layout with proper spacing