Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/react-burger-menu
Burger menu for react.
https://github.com/afeiship/react-burger-menu
burger component components drawer hamburger library menu pc react react-component sidebar sidemenu ui web
Last synced: 20 days ago
JSON representation
Burger menu for react.
- Host: GitHub
- URL: https://github.com/afeiship/react-burger-menu
- Owner: afeiship
- License: mit
- Created: 2020-10-26T02:47:50.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-16T02:28:14.000Z (almost 4 years ago)
- Last Synced: 2024-11-27T17:22:58.867Z (about 1 month ago)
- Topics: burger, component, components, drawer, hamburger, library, menu, pc, react, react-component, sidebar, sidemenu, ui, web
- Language: JavaScript
- Homepage:
- Size: 354 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-burger-menu
> Burger menu for react.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-burger-menu
```## properties
| Name | Type | Required | Default | Description |
| --------- | ------- | -------- | ------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| value | bool | false | false | The changed value. |
| onChange | func | false | noop | The change handler. |
| options | object | false | - | Drawer options. |
| trigger | func | false | noop | The trigger element. |
| extra | element | false | - | The extra element. |## usage
1. import css
```scss
@import "~@jswork/wsui-backdrop";
@import "~@jswork/wsui-drawer";
@import "~@jswork/react-drawer/dist/style.scss";
@import "~@jswork/react-burger-menu/dist/style.scss";// customize your styles:
$react-burger-menu-options: ()
```
2. import js
```js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactBurgerMenu from '@jswork/react-burger-menu';
import './assets/style.scss';class App extends React.Component {
render() {
return (
{
return (
CustomizeTrigger
);
}}
onChange={(e) => {
console.log('status changed:', e.target.value);
}}>
道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。
故常无欲,以观其妙,常有欲,以观其徼。
此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。
);
}
}ReactDOM.render(, document.getElementById('app'));
```
## documentation
- https://afeiship.github.io/react-burger-menu/## license
Code released under [the MIT license](https://github.com/afeiship/react-burger-menu/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-burger-menu
[version-url]: https://npmjs.org/package/@jswork/react-burger-menu[license-image]: https://img.shields.io/npm/l/@jswork/react-burger-menu
[license-url]: https://github.com/afeiship/react-burger-menu/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-burger-menu
[size-url]: https://github.com/afeiship/react-burger-menu/blob/master/dist/react-burger-menu.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-burger-menu
[download-url]: https://www.npmjs.com/package/@jswork/react-burger-menu