RUI.next

Navigation-Layout
SideBar

SideBar

SideBar is able to display the navigation bar vertically.

<SideBar>
  <SideBar.Item key="k1" title="item one" />
</SideBar>
<SideBar>
  <SideBar.Item key="k1" title="item one" />
</SideBar>

Example

Check the Sponsor playground for sponsors list. :-)

Basic usage of SideBar component.

SideBar (badge and disabled state)

API

PropertiesDescriptionTypeDefault
activeKeyThe key of currently active itemstring | null-
defaultActiveKeyThe initialized key of the selected item, if the activeKey is not setstring | nullkey of the 1st item
onChangeThe callback when switching SideBar(key: string) => void-

SideBar.Item

PropertiesDescriptionTypeDefault
badgeThe Badge of the itemBadgeProps['text']-
disabledWhether the item is disabledbooleanfalse
keyThe active Keystring-
titleThe title of the itemReactNode-