0.0.6 • Published 8 months ago
@licuido-ui/ui_sidebar v0.0.6
Sidebar
Sidebar is an expandable and collapsible component that typically acts as a side container to place primary or secondary content alongside the main content.
Author
- @author Hariharan hariharan@crayond.co
Link
PlayGround
Installation
npm i @licuido-ui/ui_sidebarImport component
import { Sidebar } from '@licuido-ui/ui_sidebar';Usage
<Sidebar menuData={[]} bottomMenuData={[]} />Image

Sample Code
<Sidebar
openSideBar={false}
logoDetails={{ logoImage: '/crayondLogo.png', version: 'V 1.0.1' }}
drawerWidth={271}
drawerProps={{}}
rootStyle={{}}
listStyle={{}}
listItemStyle={{}}
listButtonStyle={{}}
listIconStyle={{}}
listTextStyle={{}}
menuData={[
{
primaryText: 'Dashboard',
// secondaryText: '',
icon: <HomeWorkIcon />,
onClick: () => {
console.log('clk');
},
subMenu: [
{
primaryText: 'Super Admin',
// secondaryText: 'info',
icon: <DashboardIcon />,
subMenu: [
{
primaryText: 'Admin',
// secondaryText: 'info',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
subMenu: [
{
primaryText: 'User',
// secondaryText: 'info',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
subMenu: [
{
primaryText: 'Public',
// secondaryText: 'info',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
},
],
},
],
},
],
onClick: () => {
console.log('clk');
},
},
],
},
{
primaryText: 'Contact',
// secondaryText: 'info',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
subMenu: [
{
primaryText: 'Mobile',
secondaryText: 'India only',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
subMenu: [
{
primaryText: 'Primary',
secondaryText: '9875346587',
icon: <Leads />,
onClick: () => {
console.log('clk');
},
},
],
},
],
},
{
primaryText: 'Docs',
icon: <HomeWorkIcon />,
onClick: () => {
console.log('clk');
},
},
{
primaryText: 'About',
icon: <HomeWorkIcon />,
onClick: () => {
console.log('clk');
},
},
]}
bottomMenuData={[
{
primaryText: 'Hariharan',
secondaryText: 'Developer',
icon: <Leads sx={{ padding: '8px' }} />,
onClick: () => {
console.log('clk');
},
listIconStyle: { padding: '0' },
},
]}
/>Props
| Name | Description | Default | Control |
|---|---|---|---|
| id | string | string | string |
| openSideBar | boolean | false | False or True |
| logoDetails | { logoImage: string; logoImageStyle?: SxProps<{}>; version?: string; versionStyle?: SxProps<{}>; } | - | {} |
| drawerWidth | number | 271 | |
| menuData | ListItemProps[] | [] | [] |
| bottomMenuData | ListItemProps[] | [] | bottomMenuData |
| drawerProps | DrawerProps | - | drawerProps : {} |
| rootStyle | SxProps<{}> | { } | rootStyle : {} |
| listStyle | SxProps<{}> | { } | listStyle : {} |
| listItemStyle | SxProps<{}> | { } | listItemStyle : {} |
| listButtonStyle | SxProps<{}> | { } | listButtonStyle : {} |
| listIconStyle | SxProps<{}> | { } | listIconStyle : {} |
| listTextStyle | SxProps<{}> | { } | listTextStyle : {} |
| className | string | "" | Set string |
| sx | SxProps<Theme> | { } | Set object |
0.0.6
8 months ago