Sidebar

Sidebar UI Component

Installation

npm i @synerise/ds-sidebar
or
yarn add @synerise/ds-sidebar

Usage

import Sidebar from '@synerise/ds-sidebar'
<Sidebar />

Demo

API

Sidebar

PropertyDescriptionTypeDefault
childrenPlace for Panel elementReact.ReactNode-
orderPlace for optional Array with render orderstring[]-
onChangeOrderCalled on drag and drop fired(order: string / string[])=>void-
defaultActiveKeyPlace for optional default active panelstring[]-

Panel

PropertyDescriptionTypeDefault
headerPanel header nameReact.ReactNode / string-
childrenPanel contentReact.ReactNode / string-
idPanel unique idstring-

SidebarButton

PropertyDescriptionTypeDefault
buttonLabelprop to show text of buttonstring-
titleprop to show titlestring-
dataSourcedata of all items in dropdownstring / MenuItemProps-