![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-sidemenubar
Advanced tools
React-sidemenubar allows you to create a responsive sidebar with easy to customize.
$ npm install --save react-sidemenubar
$ yarn add react-sidemenubar
import { Menu, Toggle } from "react-sidemenubar";
import "react-sidemenubar/dist/react-sidemenubar.css";
onClick
hooks. Can pass onclick event when user interact.Toggle
function allows you to toggle the sidemenu from open to close and close to open.import React from "react";
import { Menu, Toggle } from "react-sidemenubar";
import "react-sidemenubar/dist/react-sidemenubar.css";
function App() {
const data = [
{
title: "Home",
section: true,
},
{
icon: <img src="home.png" alt="home" />,
title: "Home",
submenus: [
{
title: "Dashboard 1",
onClick: (e) => {
alert("home1");
},
},
{
title: "Dashboard 2",
onClick: (e) => {
alert("home2");
},
},
{
title: "Dashboard 3",
onClick: (e) => {
alert("home3");
},
},
],
},
{
title: "Auth",
section: true,
},
{
icon: <img src="login.png" alt="home" />,
title: "Login",
},
{
icon: <img src="register.png" alt="home" />,
title: "Register",
},
{
icon: <img src="logout.png" alt="home" />,
title: "Logout",
},
];
return (
<div>
<button
onClick={() => {
Toggle();
}}
>
Toggle
</button>
<Menu
menus={data}
bg="transparent"
activeBg="linear-gradient(45deg, #204520, #74b474)"
color="black"
activeColor="white"
menubg="#efefef"
menuborder={5}
/>
</div>
);
}
Properties used to customise the rendering:
Name | Type | Description |
---|---|---|
color | String | Text color of a menu |
data | Array | Menu items |
bg | String | Background color of menu item |
activeBg | String | Background color of menu item when user interacts |
activeColor | String | Text color of menu item when user interacts |
menubg | String | Background color of menu |
menuborder | Number | Border-radius of a menu item |
Name | Type | Description |
---|---|---|
title | String | Menu title |
icon | String or HTMLElement | 'optional' Menu icon |
submenus | Array | 'optional' Submenu items |
onClick | func | 'optional' Calls the given function when user clicks on title and pass two parameters, first one is click event and second is the object of tree prop |
section | boolean | 'optional' true if menu item is a section, default is false. |
A demo is worth a thousand words
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! venkatmcajj@gmail.com
Become a financial contributor and help us sustain our community. Contribute
Licensed under MIT
FAQs
React side menu bar allows you to add sidemenu to your app.
The npm package react-sidemenubar receives a total of 0 weekly downloads. As such, react-sidemenubar popularity was classified as not popular.
We found that react-sidemenubar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.