Description
- A Sidebar is a panel that allows the user to perform a task without leaving their current page.
- It opens when the user selects an element on the page.
- It's anchored to the right edge of the viewport.
- Sidebars are generally dismissible and are used to present more self-contained or higher-level content, like navigation, settings, or workflows that require focused input.
- They are typically used to present secondary content that temporarily shifts attention away from the main view.
Anatomy
Anatomy
Types
Sidebar has 2 types: Modal and Adaptive.
Modal sidebar (recommended)
- Use for viewports 1535 px or less.
- For consistency across apps, smart defaults govern sidebar behaviour and positioning.
- These can be overridden for specific product needs, but the final layout depends on viewport width.
Viewport 769 to 1535px
Viewport 768px or less
Adaptive sidebar (edge case)
- Use for viewports 1536px or more.
- Includes an inverse (dark theme) variant.
Viewport 1536px or more
No sidebar
Zoom behavior
- The small screen breakpoint (768px or less) also activates on larger screens when the user zooms in.
- This is the breakpoint where the modal sidebar switches to full screen mode.
- Sticky headers and footers should become non-sticky for better access to content.
- At 400 per cent zoom:
- only the browser scrollbar should be visible
- content should adapt responsively
- the 16px margin and background mask should be removed
- The same behaviour occurs when a user drags and significantly reduces the browser window size.
- It can also be triggered when viewing on a mobile screen in landscape.
Variations
With header icon
With subheading
With AI keyline
With footer
With scroll
Inverse
Best practices
- A sidebar should load content dynamically without refreshing the page.
- Avoid horizontal scroll on the sidebar or content.
- On large screens, make the header sticky so it's always visible when a user scrolls vertically.
Dos and don'ts