├── README.md ├── dist ├── bootstrap-better-nav.css ├── bootstrap-better-nav.js ├── bootstrap-better-nav.min.css └── bootstrap-better-nav.min.js ├── images ├── demo.gif ├── link-external.png └── paste-url.png └── package.json /README.md: -------------------------------------------------------------------------------- 1 | # Bootstrap Better Nav 2 | 3 | ### Tiny library that replaces the default Bootstrap navbar collapse with an elegant off-screen menu. 4 | 5 | No configuration and no additional HTML markup required. Just include the library's JavaScript and CSS files, and your new navigation is ready. 6 | 7 | ![Demo](https://raw.githubusercontent.com/bootstrapstudio/bootstrap-better-nav/master/images/demo.gif) 8 | 9 | ## Installation 10 | 11 | The library works only in Bootstrap 4 projects and requires a valid Navbar to be present on the page. 12 | 13 | To use it, simply include its CSS and JavaScript in your HTML. You can find the necessary files in the `/dist` directory of this project. CDN versions are also available via unpkg. 14 | 15 | ```html 16 | 17 | 18 | 19 | 20 | 21 | ``` 22 | 23 | Once the JavaScript is included in the page the library is automatically enabled. A new off-screen menu is added to the HTML, which is synced with the contents of your navbar automatically. 24 | 25 | ```html 26 |
27 | 28 |
29 | 30 |
31 |
32 | ``` 33 | 34 | Clicking on the navbar toggle button will show the off-screen menu instead of expanding the Bootstrap navbar. 35 | 36 | The menu has only basic styling, you can easily customize it with CSS. 37 | 38 | ## Configuring menu direction 39 | 40 | The slide-in menu can be positioned on the left or the right side of the screen. By default it is on the right, but that can be easily changed by adding the `better-bootstrap-nav-left` class to the Bootstrap navbar. 41 | 42 | ```html 43 |