Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/4xmen/x-mega-menu
x mega menu is repsonsive mega menu based on vannilajs
https://github.com/4xmen/x-mega-menu
4xmen javascript mega-menu menu navbar navigation rtl-design rtl-menu scss vannila-js xstack
Last synced: 3 days ago
JSON representation
x mega menu is repsonsive mega menu based on vannilajs
- Host: GitHub
- URL: https://github.com/4xmen/x-mega-menu
- Owner: 4xmen
- License: gpl-3.0
- Created: 2023-02-08T00:40:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-23T06:22:20.000Z (8 months ago)
- Last Synced: 2024-05-20T22:37:23.876Z (6 months ago)
- Topics: 4xmen, javascript, mega-menu, menu, navbar, navigation, rtl-design, rtl-menu, scss, vannila-js, xstack
- Language: JavaScript
- Homepage: https://4xmen.ir
- Size: 1010 KB
- Stars: 114
- Watchers: 3
- Forks: 28
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
X Mega Menu
# X-Mega-Menu
x mega menu is easy usable multi level responsive with vanillaJS very fast and without any dependencies (ltr and rtl support).
## How use it?
With package manager:
````
npm i x-mega-menu
````
or
````
yarn add x-mega-menu
````or you can use CDN package:
CSS ⬇️
````````
JavaScript ⬇️
````````
add assets:
```html
```HTML:
```html
-
-
menu item 1
-
sub item 1
-
sub item 2
- sub sub item 01
- sub sub item 02
-
sub sub item 03 has
- sub sub sub item 001
- sub sub sub item 002
- sub sub sub item 003
-
sub sub sub item 004 has sub
- sub sub sub item 001
- sub sub sub item 002
- sub sub sub item 003
- sub sub sub item 004
- sub sub sub item 005
-
sub sub sub item 005 has too
- sub sub sub item 001
- sub sub sub item 002
- sub sub sub item 003
- sub sub sub item 004
- sub sub sub item 005
- sub sub item 04
- sub sub item 05
-
sub item 3
-
This highlight section
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi autem doloremque ducimus enim
est et facilis iusto laboriosam magni molestiae molestias nesciunt obcaecati optio possimus
quam, quidem quos repudiandae sunt.
-
-
menu item 2
-
sub item 1
-
sub item 3
-
sub item 1
-
This highlight section
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi autem doloremque ducimus enim
est et facilis iusto laboriosam magni molestiae molestias nesciunt obcaecati optio possimus
quam, quidem quos repudiandae sunt.
-
-
menu item 3
-
menu item 4
-
menu item 3
-
menu item 4
-
🔍
```
javascript use:
```javascript
xMegaMenu('#mega-menu', {
responseWidth: 1124,
isRtl: true,
mainTitle: '🖤 xStack menu 🖤',
blurEffect: true,
disableLinks: true,
fixedTop: true,
onCloseSideMenu: function () {
console.log('closed');
},
onOpenSideMenu: function () {
console.log('opened');
}
});
```
# webpack or vite (`vuejs` or `reactjs`) usage
1. import css or scss
```scss
@import "~x-mega-menu/src/x-mega-menu";
```
2. import js and use it
```javascript
import xMegaMenu from 'x-mega-menu/dist/x-mega-menu';
xMegaMenu('#mega-menu', {
// options
});
```
# Screenshots
Mega Menu Style
Blue Theme
Red Theme
Dark Theme
## 🔗 Links
https://www.npmjs.com/package/x-tree-select
http://4xmen.ir/
https://xstack.ir
## DEMO (example)
- You can watch /example of project.
- [online demo](https://demos.4xmen.ir/x-mega-menu/example/)
- [online rtl demo](https://demos.4xmen.ir/x-mega-menu/example/index-rtl.html)
## option and events
| name | default | action |
| ------------ | ------------ | ------------ |
| responseWidth | `1024` | active mobile mode (side menu) |
| barsIcon | - | any html element use for toggle bar |
| mainTitle | `Navbar menu` | change main menu title |
| isRtl | `false` | change direction to rtl |
| blurEffect | `false` | blur effect when menu active |
| resetMenu | `true` | reset side menu when close |
| disableLinks | `true` | disable links when has sub menu click event otherwise on mouse enter show sub level |
###events
| name | action |
| ------------ | ------------ |
| onCloseSideMenu | Trigger when side menu open |
| onOpenSideMenu | Trigger when side menu close |
## Theme
* Dark
* Red
* Blue
* gray
* customizable theme as you want
## Report Some Bugs
Find a Bug? Please, [create an issue](https://github.com/4xmen/x-mega-menu/issues) and we'll fix it together for a better template.
## Contribution
Contribution are always welcome and recommended! Here is how:
- Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)).
- Clone to your machine git clone https://github.com/YOUR_USERNAME/Anubias-Desktop.git
- Make your changes
- Create a pull request
## Developing project
Dependencies are `node-sass` and `minify`
To render css:
```shell
npm run scss
```
To build:
```shell
npm run build
```
## Badges
[![X-Mega-Menu](https://img.shields.io/badge/Mega-Menu-red.svg)](https://github.com/4xmen/x-mega-menu)
[![GitHub](https://img.shields.io/badge/Github-4xmen-blue.svg)](https://GitHub.com/4xmen)
[![Xstack](https://img.shields.io/badge/Xstack-Team-red.svg)](https://xstack.ir)
[![4xmen](https://img.shields.io/badge/4xmen-Team-black.svg)](https://4xmen.ir)
[![Devefun](https://img.shields.io/badge/Devefun-Community-blue.svg)](https://Telegram.me/Devefun)
## License
[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/GNU)
[GPL](https://www.gnu.org/licenses/gpl-3.0.en.html)
## Support
Star Repo If Like It ...