Gathering detailed insights and metrics for react-pro-sidebar
Gathering detailed insights and metrics for react-pro-sidebar
Gathering detailed insights and metrics for react-pro-sidebar
Gathering detailed insights and metrics for react-pro-sidebar
react-modal-pro
Reusable react modal with dialog, sidebar and sheet.
sidebar-react-pro
Welcome to our modern and responsive sidebar solution! Designed to adapt seamlessly across all devices and screen sizes, our sidebar enhances user experience by providing easy navigation and accessibility in various contexts.
react-infinity-sidebar
A fully customizable and responsive sidebar component for React applications, built with TailwindCSS and Headless UI. Easily integrate dynamic navigation menus, dark mode, and various styling options. Designed for dashboards, admin panels, and modern web
@hepter/react-pro-sidebar
high level and customizable side navigation
React Pro Sidebar provides a set of components for creating high level and customizable side navigation
npm install react-pro-sidebar
Typescript
Module System
TypeScript (97.31%)
HTML (1.49%)
JavaScript (1.15%)
Shell (0.05%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,783 Stars
313 Commits
415 Forks
14 Watchers
6 Branches
7 Contributors
Updated on Jul 11, 2025
Latest Version
1.1.0
Package Id
react-pro-sidebar@1.1.0
Unpacked Size
438.52 kB
Size
100.41 kB
File Count
34
Published on
Feb 03, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
40
React Pro Sidebar provides a set of components for creating high level and customizable side navigation
1yarn add react-pro-sidebar
1npm install react-pro-sidebar
1import { Sidebar, Menu, MenuItem, SubMenu } from 'react-pro-sidebar'; 2 3<Sidebar> 4 <Menu> 5 <SubMenu label="Charts"> 6 <MenuItem> Pie charts </MenuItem> 7 <MenuItem> Line charts </MenuItem> 8 </SubMenu> 9 <MenuItem> Documentation </MenuItem> 10 <MenuItem> Calendar </MenuItem> 11 </Menu> 12</Sidebar>;
You can make use of the component
prop to integrate React Router link
Example Usage
1import { Sidebar, Menu, MenuItem } from 'react-pro-sidebar'; 2import { Link } from 'react-router-dom'; 3 4<Sidebar> 5 <Menu 6 menuItemStyles={{ 7 button: { 8 // the active class will be added automatically by react router 9 // so we can use it to style the active menu item 10 [`&.active`]: { 11 backgroundColor: '#13395e', 12 color: '#b6c8d9', 13 }, 14 }, 15 }} 16 > 17 <MenuItem component={<Link to="/documentation" />}> Documentation</MenuItem> 18 <MenuItem component={<Link to="/calendar" />}> Calendar</MenuItem> 19 <MenuItem component={<Link to="/e-commerce" />}> E-commerce</MenuItem> 20 </Menu> 21</Sidebar>;
We provide for each component rootStyles
prop that can be used to customize the styles
its recommended using utility classes (sidebarClasses
, menuClasses
) for selecting target child nodes
Example usage
1<Sidebar 2 rootStyles={{ 3 [`.${sidebarClasses.container}`]: { 4 backgroundColor: 'red', 5 }, 6 }} 7> 8 // ... 9</Sidebar>
For Menu
component, in addition to rootStyles
you can also use menuItemStyles
prop for customizing all MenuItem
& SubMenu
components and their children
Type definition
1interface MenuItemStyles { 2 root?: ElementStyles; 3 button?: ElementStyles; 4 label?: ElementStyles; 5 prefix?: ElementStyles; 6 suffix?: ElementStyles; 7 icon?: ElementStyles; 8 subMenuContent?: ElementStyles; 9 SubMenuExpandIcon?: ElementStyles; 10} 11 12type ElementStyles = CSSObject | ((params: MenuItemStylesParams) => CSSObject | undefined);
Example usage
1<Sidebar> 2 <Menu 3 menuItemStyles={{ 4 button: ({ level, active, disabled }) => { 5 // only apply styles on first level elements of the tree 6 if (level === 0) 7 return { 8 color: disabled ? '#f5d9ff' : '#d359ff', 9 backgroundColor: active ? '#eecef9' : undefined, 10 }; 11 }, 12 }} 13 > 14 //... 15 </Menu> 16</Sidebar>
Component | Prop | Type | Description | Default |
---|---|---|---|---|
Sidebar | defaultCollapsed | boolean | Initial collapsed status | false |
collapsed | boolean | Sidebar collapsed state | false | |
toggled | boolean | Sidebar toggled state | false | |
width | number | string | Width of the sidebar | 270px | |
collapsedWidth | number | string | Width of the sidebar on collapsed state | 80px | |
backgroundColor | string | Set background color for sidebar | rgb(249, 249, 249, 0.7) | |
image | string | Url of the image to use in the sidebar background, need to apply transparency to background color | - | |
breakPoint | xs | sm | md | lg | xl | xxl | all | Set when the sidebar should trigger responsiveness behavior | - | |
customBreakPoint | string | Set custom breakpoint value, this will override breakPoint prop | - | |
transitionDuration | number | Duration for the transition in milliseconds to be used in collapse and toggle behavior | 300 | |
rtl | boolean | RTL direction | false | |
rootStyles | CSSObject | Apply styles to sidebar element | - | |
onBackdropClick | () => void | Callback function to be called when backdrop is clicked | - | |
Menu | closeOnClick | boolean | If true and sidebar is in collapsed state, submenu popper will automatically close on MenuItem click | false |
menuItemStyles | MenuItemStyles | Apply styles to MenuItem and SubMenu components and their children | - | |
renderExpandIcon | (params: { level: number; collapsed: boolean; disabled: boolean; active: boolean; open: boolean; }) => React.ReactNode | Render method for customizing submenu expand icon | - | |
transitionDuration | number | Transition duration in milliseconds to use when sliding submenu content | 300 | |
rootStyles | CSSObject | Apply styles from Menu root element | - | |
MenuItem | icon | ReactNode | Icon for the menu item | - |
active | boolean | If true , the component is active | false | |
disabled | boolean | If true , the component is disabled | - | |
prefix | ReactNode | Add a prefix to the menuItem | - | |
suffix | ReactNode | Add a suffix to the menuItem | - | |
component | string | ReactElement | A component used for menu button node, can be string (ex: 'div') or a component | - | |
rootStyles | CSSObject | Apply styles to MenuItem element | - | |
SubMenu | label | string | ReactNode | Label for the submenu | - |
icon | ReactNode | Icon for submenu | - | |
defaultOpen | boolean | Set if the submenu is open by default | false | |
open | boolean | Set open value if you want to control the state | - | |
active | boolean | If true , the component is active | false | |
disabled | boolean | If true , the component is disabled | - | |
prefix | ReactNode | Add a prefix to the submenu | - | |
suffix | ReactNode | Add a suffix to the submenu | - | |
onOpenChange | (open: boolean) => void | Callback function called when submenu state changes | - | |
component | string | React.ReactElement | A component used for menu button node, can be string (ex: 'div') or a component | - | |
rootStyles | CSSObject | Apply styles to SubMenu element | - |
MIT © Mohamed Azouaoui
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/6 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
58 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More