A sidebar displays a column of column which overlays the primary content area. It is used to provide additional detail about selected elements.

Example

⌘ Cmd + ⌥ Option + 1

Properties

propertypropTyperequireddefaultdescription
anchoroneOf 'left' | 'right'-'right' Determines whether the sidebar should render on
the left or right side of the page
borderbool-falseDetermines if the sidebar should have a border
dockedbool-false Docked sidebars push page-content to left or right when open.
Un-docked sidebars render open over page-content (i.e postition absolute)
isOpenbool-falseDetermines if the sidebar is visible
widthnumber-0The pixel width of the sidebar
boxShadowbool--Determines if the sidebar should have a box shadow
childrennodeyes-Sidebar children
testSectionstring--Hook for automated JavaScript tests

Usage

Instead of using a modal dialog, the Sidebar component provides a way to view and interact with content without blocking the content below.

Best Practices

Do

Sidebar works best with short tabluar content and key/value pairs

Don't

Avoid Sidebar when requiring lots of user input, consider Sheet instead