# Sidebar A composable and customizable vertical navigation component with support for multiple variants, collapsible states, and custom content areas. ## Import ```tsx import { Sidebar } from '@coinbase/cds-web/navigation/Sidebar' ``` ## Examples Sidebar is a vertical navigation component for accessing different sections of an application. It supports multiple variants, collapsible states, and custom content areas. ### Basics A Sidebar is composed of the following parts: - `Sidebar` - The main container with logo and navigation items - `SidebarItem` - Individual navigation items with icon and title - `SidebarMoreMenu` - Overflow menu for additional navigation options ```jsx live function BasicSidebar() { const [activeIndex, setActiveIndex] = useState(0); const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Settings', icon: 'cog' }, ]; return ( }> {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} ); } ``` ### Variants #### Default Use the Default variant on standard consumer-facing surfaces like Retail where maximum navigation and content space is desired. This variant shows full labels alongside icons. ```jsx live function DefaultVariant() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Pay', icon: 'pay' }, { title: 'For you', icon: 'newsFeed' }, { title: 'Earn', icon: 'giftBox' }, { title: 'Borrow', icon: 'cash' }, { title: 'DeFi', icon: 'defi' }, ]; const [activeIndex, setActiveIndex] = useState(0); const [moreMenuValue, setMoreMenuValue] = useState(); const navItems = items.slice(0, 8); const moreMenuOptions = items.slice(4); const handleMoreMenuChange = (newValue) => { const moreIndex = moreMenuOptions.findIndex((option) => option.title === newValue) + navItems.length; setActiveIndex(moreIndex); setMoreMenuValue(newValue); }; const handleItemPress = (index) => { setActiveIndex(index); setMoreMenuValue(undefined); }; const renderEnd = () => { return ( console.log} > End item ); }; return ( } renderEnd={renderEnd} styles={{ end: { width: '100%', }, }} > {navItems.map((item, index) => ( handleItemPress(index)} tooltipContent={item.title} {...item} /> ))} = navItems.length} onChange={handleMoreMenuChange} tooltipContent="More" value={moreMenuValue} > {moreMenuOptions.map((item) => ( } value={item.title} /> ))} ); } ``` #### Condensed Use in specialized workflows with complex data displays, such as Exchange and Advanced Trade, where navigation space is minimized to focus on core tasks. This variant displays icons with small labels below. ```jsx live function CondensedVariant() { const items = [ { title: 'Spot', icon: 'chartCandles' }, { title: 'Futures', icon: 'chartBar' }, { title: 'Portfolio', icon: 'chartPie' }, { title: 'Orders', icon: 'documentation' }, { title: 'For you', icon: 'newsFeed' }, { title: 'Earn', icon: 'giftBox' }, { title: 'Borrow', icon: 'cash' }, { title: 'DeFi', icon: 'defi' }, ]; const [activeIndex, setActiveIndex] = useState(0); const [moreMenuValue, setMoreMenuValue] = useState(); const navItems = items.slice(0, 4); const moreMenuOptions = items.slice(4); const handleMoreMenuChange = (newValue) => { const moreIndex = moreMenuOptions.findIndex((option) => option.title === newValue) + navItems.length; setActiveIndex(moreIndex); setMoreMenuValue(newValue); }; const handleItemClick = (index) => { setActiveIndex(index); setMoreMenuValue(undefined); }; return ( } variant="condensed"> {navItems.map((item, index) => ( handleItemClick(index)} tooltipContent={item.title} {...item} /> ))} = navItems.length} onChange={handleMoreMenuChange} tooltipContent="More" value={moreMenuValue} > {moreMenuOptions.map((item) => ( } value={item.title} /> ))} ); } ``` ### Collapsed State #### Controlled Collapse Use the `collapsed` prop to control the sidebar's collapsed state. When collapsed, only icons are shown with tooltips for labels. ```jsx live function ControlledCollapse() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Pay', icon: 'pay' }, { title: 'For you', icon: 'newsFeed' }, { title: 'Earn', icon: 'giftBox' }, { title: 'Borrow', icon: 'cash' }, { title: 'DeFi', icon: 'defi' }, ]; const [activeIndex, setActiveIndex] = useState(0); const [moreMenuValue, setMoreMenuValue] = useState(); const [collapsed, setCollapsed] = useState(true); const moreMenuOptions = items.slice(4); const handleMoreMenuChange = (newValue) => { const moreIndex = moreMenuOptions.findIndex((option) => option.title === newValue) + items.length; setActiveIndex(moreIndex); setMoreMenuValue(newValue); }; const handleItemPress = (index) => { setActiveIndex(index); setMoreMenuValue(undefined); }; const renderEnd = () => ( setCollapsed(!collapsed)} width="48px" height="48px" /> ); return ( } renderEnd={renderEnd}> {items.map((item, index) => ( handleItemPress(index)} tooltipContent={item.title} {...item} /> ))} = items.length} onChange={handleMoreMenuChange} tooltipContent="More" value={moreMenuValue} > {moreMenuOptions.map((item) => ( } value={item.title} /> ))} ); } ``` #### Auto Collapse Use the `autoCollapse` prop to automatically collapse the sidebar at or below the tablet breakpoint (768px). This is useful for responsive layouts where the sidebar should adapt to screen size. ```jsx live function AutoCollapse() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Settings', icon: 'cog' }, ]; const [activeIndex, setActiveIndex] = useState(0); return ( }> {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} Resize the browser window to see the sidebar auto-collapse at the tablet breakpoint. ); } ``` ### Custom Content #### Logo The `logo` prop accepts either a React element or a render function that receives the collapsed state. Use the render function when you need different logos for collapsed and expanded states. ```jsx live function CustomLogo() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, ]; const [activeIndex, setActiveIndex] = useState(0); const [collapsed, setCollapsed] = useState(false); const renderLogo = (isCollapsed) => isCollapsed ? ( ) : ( ); return ( ( setCollapsed(!collapsed)} /> )} > {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} ); } ``` #### Render End The `renderEnd` prop places content at the bottom of the sidebar. It receives the collapsed state as a parameter, allowing you to adapt the content based on the sidebar's state. ```jsx live function RenderEndExample() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, ]; const [activeIndex, setActiveIndex] = useState(0); const renderEnd = (isCollapsed) => ( alert('Help clicked!')} > {!isCollapsed && ( Help & Support )} ); return ( } renderEnd={renderEnd} styles={{ end: { width: '100%', }, }} > {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} ); } ``` ### Styling Use the `styles` prop to customize specific parts of the sidebar. ```jsx live function CustomStyles() { const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Settings', icon: 'cog' }, ]; const [activeIndex, setActiveIndex] = useState(0); return ( } renderEnd={() => ( Help )} styles={{ root: { background: 'linear-gradient(180deg, var(--color-bg) 0%, var(--color-bgAlternate) 100%)', }, logo: { paddingBottom: 32 }, end: { width: '100%' }, }} > {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} ); } ``` You can also use custom class names on the various subcomponents in Sidebar using the `classNames` prop. ```jsx const customLogoStyles = css` padding-bottom: var(--spacing-6); `; function CustomClassNamesExample() { const [activeIndex, setActiveIndex] = useState(0); const items = [ { title: 'Home', icon: 'home' }, { title: 'Assets', icon: 'chartPie' }, { title: 'Trade', icon: 'trading' }, { title: 'Settings', icon: 'cog' }, ]; return ( } classNames={{ logo: customLogoStyles, }} > {items.map((item, index) => ( setActiveIndex(index)} title={item.title} tooltipContent={item.title} /> ))} ); } ``` ### Composed Examples #### Application Shell A complete application layout with sidebar navigation, main content area, and responsive behavior. ```jsx live function ApplicationShell() { const items = [ { title: 'Dashboard', icon: 'home' }, { title: 'Analytics', icon: 'chartPie' }, { title: 'Transactions', icon: 'trading' }, { title: 'Payments', icon: 'pay' }, { title: 'News Feed', icon: 'newsFeed' }, { title: 'Rewards', icon: 'giftBox' }, { title: 'Lending', icon: 'cash' }, { title: 'DeFi', icon: 'defi' }, ]; const [activeIndex, setActiveIndex] = useState(0); const [moreMenuValue, setMoreMenuValue] = useState(); const navItems = items.slice(0, 5); const moreMenuOptions = items.slice(5); const handleMoreMenuChange = (newValue) => { const moreIndex = moreMenuOptions.findIndex((option) => option.title === newValue) + navItems.length; setActiveIndex(moreIndex); setMoreMenuValue(newValue); }; const handleItemPress = (index) => { setActiveIndex(index); setMoreMenuValue(undefined); }; const currentPage = items[activeIndex]?.title || 'Dashboard'; return ( } renderEnd={(isCollapsed) => ( {!isCollapsed && Settings} {!isCollapsed && Profile} )} > {navItems.map((item, index) => ( handleItemPress(index)} title={item.title} tooltipContent={item.title} /> ))} = navItems.length} onChange={handleMoreMenuChange} tooltipContent="More" value={moreMenuValue} > {moreMenuOptions.map((item) => ( } value={item.title} /> ))} {currentPage} Welcome to the {currentPage.toLowerCase()} page. This is a sample application shell demonstrating the Sidebar component with responsive behavior. ); } ``` #### Condensed Trading Interface A condensed sidebar optimized for professional trading interfaces with minimal visual footprint. ```jsx live function TradingInterface() { const items = [ { title: 'Spot', icon: 'chartCandles' }, { title: 'Futures', icon: 'chartBar' }, { title: 'Portfolio', icon: 'chartPie' }, { title: 'Orders', icon: 'documentation' }, ]; const [activeIndex, setActiveIndex] = useState(0); return ( } variant="condensed"> {items.map((item, index) => ( setActiveIndex(index)} title={item.title} /> ))} BTC/USD $67,432.50 {items[activeIndex].title} Chart Area ); } ``` ## Props | Prop | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `children` | `ReactNode[]` | Yes | `undefined` | Children are expected to be an array of SidebarItems | | `alignContent` | `ResponsiveProp
` | No | `-` | - | | `alignItems` | `ResponsiveProp
` | No | `-` | - | | `alignSelf` | `ResponsiveProp
` | No | `-` | - | | `as` | `nav` | No | `-` | The underlying element or component the polymorphic component will render. Changing as also changes the inherited native props (e.g. href for as=a) and the expected ref type. | | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `autoCollapse` | `boolean` | No | `false` | When set, the sidebar will auto collapse at or below the tablet breakpoint (currently 768px) | | `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - | | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - | | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - | | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - | | `borderColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - | | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - | | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - | | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - | | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - | | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - | | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - | | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - | | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. | | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. | | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. | | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. | | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. | | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. | | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. | | `bottom` | `ResponsiveProp>` | No | `-` | - | | `classNames` | `{ root?: string; logo?: string \| undefined; content?: string \| undefined; end?: string \| undefined; } \| undefined` | No | `-` | Custom class names for the sidebar components. | | `collapsed` | `boolean` | No | `false` | Use collapsed to show only the logo | | `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - | | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `dangerouslySetBackground` | `string` | No | `-` | - | | `display` | `ResponsiveProp` | No | `-` | - | | `elevation` | `0 \| 1 \| 2` | No | `-` | - | | `flexBasis` | `ResponsiveProp>` | No | `-` | - | | `flexDirection` | `ResponsiveProp` | No | `-` | - | | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - | | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - | | `flexWrap` | `ResponsiveProp` | No | `-` | - | | `font` | `ResponsiveProp` | No | `-` | - | | `fontFamily` | `ResponsiveProp` | No | `-` | - | | `fontSize` | `ResponsiveProp` | No | `-` | - | | `fontWeight` | `ResponsiveProp` | No | `-` | - | | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - | | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridAutoColumns` | `ResponsiveProp>` | No | `-` | - | | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - | | `gridAutoRows` | `ResponsiveProp>` | No | `-` | - | | `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - | | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - | | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - | | `gridTemplateColumns` | `ResponsiveProp>` | No | `-` | - | | `gridTemplateRows` | `ResponsiveProp>` | No | `-` | - | | `height` | `ResponsiveProp>` | No | `-` | - | | `justifyContent` | `ResponsiveProp` | No | `-` | - | | `key` | `Key \| null` | No | `-` | - | | `left` | `ResponsiveProp>` | No | `-` | - | | `lineHeight` | `ResponsiveProp` | No | `-` | - | | `logo` | `ReactElement> \| ((isCollapsed: boolean) => ReactNode)` | No | `undefined` | The logo to display | | `margin` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginBottom` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginEnd` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginStart` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginTop` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginX` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `marginY` | `ResponsiveProp<0 \| -3 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10>` | No | `-` | - | | `maxHeight` | `ResponsiveProp>` | No | `-` | - | | `maxWidth` | `ResponsiveProp>` | No | `-` | - | | `minHeight` | `ResponsiveProp>` | No | `-` | - | | `minWidth` | `ResponsiveProp>` | No | `-` | - | | `onChange` | `FormEventHandler` | No | `-` | - | | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - | | `overflow` | `ResponsiveProp` | No | `-` | - | | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. | | `position` | `ResponsiveProp` | No | `-` | - | | `ref` | `((instance: HTMLElement \| null) => void) \| RefObject \| null` | No | `-` | - | | `renderEnd` | `((isCollapsed: boolean) => ReactNode)` | No | `undefined` | This node will be fixed to the bottom of the sidebar This is a render prop, and will provide the collapsed state | | `right` | `ResponsiveProp>` | No | `-` | - | | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - | | `style` | `CSSProperties` | No | `-` | - | | `styles` | `{ root?: CSSProperties; logo?: CSSProperties \| undefined; content?: CSSProperties \| undefined; end?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the sidebar components. | | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID | | `textAlign` | `ResponsiveProp
` | No | `-` | - | | `textDecoration` | `ResponsiveProp` | No | `-` | - | | `textTransform` | `ResponsiveProp` | No | `-` | - | | `top` | `ResponsiveProp>` | No | `-` | - | | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - | | `userSelect` | `ResponsiveProp` | No | `-` | - | | `variant` | `default \| condensed` | No | `-` | - | | `visibility` | `ResponsiveProp` | No | `-` | - | | `width` | `ResponsiveProp>` | No | `-` | - | | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |