bootstrap выезжающее боковое меню
Bootstrap выезжающее боковое меню
Bootstrap 4 сниппет: адаптивное боковое меню
Точнее, боковое меню, которое при уменьшении размера браузера трансформируется в стандартное для Bootstrap верхнее меню. Ну а чтобы не было так уж скучно, добавим ещё и аккордеон для пунктов второго уровня. В конце поста будет линк на Codepen, где можно посмотреть и исходный код, и сниппет в действии.
Всё до безобразия просто: копируем навигацию с сайта Bootstrap и немного её меняем. Прежде всего, в тэг списка пунктов меню добавим класс sidenav и идентификатор navAccordion :
А в ссылки, указывающие на пункты второго уровня добавим класс nav-link-collapse и конечно же атрибуты для аккордеона, которые опять-таки можно посмотреть на соответствующей странице документации Bootstrap. Т.е. пукнт меню с вложенными подпунктами будет выглядеть так:
Разумеется, чтобы сработало абсолютное позиционирование для меню, нужно задать относительное позиционирование для родителя (тэг html ).
Кроме вышеописанного, будет совсем не лишним показать пользователю, что некоторые пункты меню раскрываются. Для чего справа от таких пунктов добавим знак +, а в раскрытом состоянии, соответственно, минус (и да поможет нам с символами Font Awesome):
Класса nav-link-show в html коде у нас как бы и нет, но при кликах на меню с подпунктами его добавлением займётся JavaScript.
JavaScript
Напоследок обещанная ссылка на демо и исходники:
20 Free Bootstrap Sidebar Navigation Templates 2021
Here are our best bootstrap sidebar navigation templates and examples that you can use in your web design.
We dedicated tons of sleepless nights and emptied many jugs of coffee to create this ULTIMATE COLLECTION of all-around sidebars for you.
Placing navigation menus in a sidebar will allow your visitors to quickly navigate from one page to another on your website.
But you can also use it for user profiles, contact forms, newsletter subscriptions, and more. A shopping cart works, too.
That said, a sidebar will also increase site engagement if you provide appropriate links and other useful info.
Free Bootstrap Sidebar Navigations
Bootstrap Sidebar by Colorlib V1
For a free, creative and straightforward Bootstrap sidebar, we bring you different alternatives that you can put into practice right away. Here is the first version that appears pretty simplistic, yet still ensures originality.
If you would like to add awesome navigability to your website, you can now make it happen without the need to build it yourself.
The layout is 100% flexible and responsive, working on all devices like a dream. Moreover, it also features a drop-down menu and an option to hide it (OFF-CANVAS).
Last but not least, you can add additional information and an avatar, too. Enrich your website with a solid sidebar and make an immediate difference.
Bootstrap Sidebar by Colorlib V2
Instead of going with a dull and boring sidebar, you can always spice things up with Bootstrap Sidebar by Colorlib V2. The second version comes with a vibrant purple color that will LEVEL UP your online presence.
However, if you would like to tweak it, you can do that, too. Similarly to all the other sidebar samples that you find on this list, this one is mobile-friendly just as well.
You can test it out by heading over to the live preview page.
Along with the drop-down menu, Bootstrap Sidebar by Colorlib V2 also includes extra space for text and copyright, as well as newsletter subscription form.
It comes with no hidden charges, readily available for you to make the most out of it. Level up your online presence with a nifty addition of a fascinating sidebar.
Sidebar by Colorlib V3
Creativity and modernness are the two main characteristics of this next Bootstrap sidebar layout. If you would like to make it your own, simply hit on the download button and get your hands on it.
From then on, you can start benefitting from its perks and introduce it to your website right from the get-go. And if you fancy the look, by all means, use it EXACTLY as it comes out of the box.
Of course, you can refine it, too, and make it follow your branding directions.
Moreover, the tool comes as an off-canvas sidebar that appears or disappears with a click on the button. Use the design for bringing into fruition a dope sidebar navigation with a convenient newsletter subscription form.
Sidebar by Colorlib V4
Here is the fourth version of our very own Bootstrap sidebar with a beautiful dark look. Instead of following the traditional position of the navigation, you can now add it to a sidebar.
Also, this layout fully supports the off-canvas structure that offers a GREAT experience browsing through your site’s content.
Not to mention, the sidebar is entirely compatible with mobile devices, too.
Instead of doing the work from square one, make it happen with a predefined design that SAVES you additional time and energy.
Sidebar by Colorlib V5
In this collection of the most promising free Bootstrap sidebars, you will find the right one that suits your web application out of the box. And if the one you dig needs ADDITIONAL customization tweaks, feel free to perform them.
After all, for as long as you keep the copyright intact, you are free to tailor the layout to your needs precisely.
The Bootstrap sidebar by Colorlib V5 rocks a lovely and impactful appearance that calls for a beautiful addition to your existing website. It is easy to use, lightweight and in harmony with smartphones, tablets and desktops.
Get things moving in the right direction with practical sidebar navigation that includes newsletter subscription form.
Sidebar by Colorlib V6
While the majority of Bootstrap sidebars come with a solid color, Colorlib V6 alternative is for those who need something DIFFERENT. It features a gradient effect with a background image that will level up your online presence right from the get-go.
If that is something that triggers your interest, by all means, pick it now and add it to your website.
Out of the box, this sidebar design is ideal for a travel agency, however, you can employ it for all sorts of different intentions, too. After all, you can easily modify it and tailor it to your needs.
Sidebar by Colorlib V7
A very modern, clean and attractive looking Bootstrap sidebar that was put together with love by the Colorlib team. It works great both on mobile and desktop devices due to its outstanding Bootstrap structure.
What’s more, it is a perfect alternative for adding an off-canvas sidebar to your website. If you like the contemporary touch that this sidebar sports, you are more than welcome to use it on your website or application.
In JUST A CLICK, the tool can be yours, and you can already start putting it into play. Keep your online presence of the highest degree and make a difference.
Sidebar by Colorlib V8
For everyone who likes minimalism and cleanness, you better check the Colorlib V8 sidebar. It is based on the well-liked Bootstrap Framework for the required flexibility and extendability.
The sidebar sports a drop-down menu that offers great navigation throughout your website’s content.
Out of the box, it is an IDEAL solution for an eCommerce website, yet you can use it for pretty much any online project that you operate or plan to start.
There is also a tag cloud and newsletter subscription form. Perform refining touches and start with the right foot forward.
Sidebar by Colorlib V9
A beautiful, dark and impactful Bootstrap sidebar that will spark everyone’s curiosity. It is our own creation that we simply call Colorlib V9 sidebar. Why complicate where you do not have to, right?
You can utilize the tool for all sorts of different aims and intentions due to its outstanding FLEXIBILITY. Although it operates fantastically well as is, you can also step it up by performing customization tweaks.
The sidebar comes ideal for a profile page in a members’ area of a website. But that is not the rule that you should stick to.
Think outside the box, and you unlock yourself an array of possibilities just like that.
Sidebar by Colorlib V10
While some prefer a left side position for a sidebar, all the others like it on the right side of a website. If the latter is your cup of tea, you better not miss checking out Bootstrap Sidebar by Colorlib V10.
However, this is not just an everyday sidebar design since it sports a nifty gradient effect and an image as a background. On top of that, it comes with a newsletter subscription form that you can activate, too.
Many options for a FRESH and KILLER addition to your website.
Get involved now and enjoy the sidebar without the need to open your wallet.
Colorlib Sidebar V01
Colorlib Sidebar V01 is our free template that would work the best for social media networks or forums. The tool smoothly appears from the left side with multiple sections that offer the user awesome navigability over their profile options.
First comes an avatar with the name and location. Second are the number of posts, followers and how many users the person follows.
And the last are ADDITIONAL links to different sections, like feed, stats, notifications and more.
Keep in mind, you don’t need to use Colorlib Sidebar V01 out of the box. There’s always an option to alter it to your needs.
Colorlib Sidebar V02
Colorlib Sidebar V02 is another great user profile sidebar, which is more on the minimal side compared to Colorlib Sidebar V01.
The free Bootstrap sidebar comes with a larger profile image, a checkmark for approved profiles, number of photos and followers, to name a few.
Moreover, the layout STAYS 100% intact whether viewing it on mobile or on desktop.
Colorlib Sidebar V03
If you are on the hunt for a Bootstrap sidebar that acts as a newsletter subscription, you better not miss Colorlib Sidebar V03. It’s an off-canvas sidebar that guarantees a pleasant experience.
By default, it comes with an impactful blue background, but that’s something you can configure to fit your branding regulations.
Title and text are available to convince the user to enter their email and hit the “sign up” button. Use them STRATEGICALLY.
Colorlib Sidebar V04
There are multiple ways of adding a contact form to your website, a Bootstrap sidebar being one of them. Colorlib Sidebar V04 is a perfect example of that, featuring a chat icon that opens the sidebar contact form and dims the rest of the website.
The contact form is pretty standard, with name and email fields, plus a text area. If you want, you can also modify the “get in touch” text – you may have something even better.
Colorlib Sidebar V05
Colorlib Sidebar V05 is a fantastic free snippet that helps you add a menu and featured users in the sidebar. Membership areas, forums, even blogs, you are all welcome to import this sidebar to your web applications.
Skip building it FROM SCRATCH.
Since the sidebar doesn’t come wide, you know the performance across different devices will be phenomenal.
What’s cool, by accessing the live demo preview, you can A-test it first and go from there.
Colorlib Sidebar V06
You can use Colorlib Sidebar V06 in different ways. How? The code is organized, so you can quickly alter for sidebar menu, user profile and the like.
Along with the links with icons and a hover effect, this free Bootstrap sidebar also includes a search bar. Don’t neglect the power of a search bar, as it can boost your website’s UX.
Colorlib Sidebar V07
Colorlib Sidebar V07 is something a little different compared to the other Bootstrap sidebars that we have here. It comes with a progress bar for user account creation.
This advanced sidebar template also features a dark design and an off-canvas layout. Additionally, it rocks a green checkmark for completed steps and a hover effect.
You will ALSO find an avatar and name at the bottom.
Colorlib Sidebar V08
We’ve already featured a somewhat similar Bootstrap sidebar above (Colorlib Sidebar V01), but there’s a FEATURE that differentiates the two slightly.
For some, it’s a big change because this is the exact sidebar they are after.
While Colorlib Sidebar V08 comes with a dropdown, it does not feature the number of posts, followers and following.
What’s more, it’s completely congruent with smartphones, tablets and desktops.
Colorlib Sidebar V09
To make the online shopping experience as smooth and as distraction-free, Colorlib Sidebar V09 is great for displaying a shopping cart in a sidebar.
While it only appears with the total price and number of items, once you click on it, an off-canvas sidebar reveals goodies in detail.
You can also link it to the checkout page so that the user can proceed with shipping and payment details RIGHT AWAY.
You can even activate the “remove” option, which needs no further explanation.
Colorlib Sidebar V10
Colorlib Sidebar V10 is a modern and creative sidebar solution for online journals and blogs. It comes with a text logo/title, text, menu and social media icons that activate on HOVER.
But what makes it stand out the most is the image background that this Bootstrap sidebar rocks.
Colorlib Sidebar V10 also features the off-canvas design, so it “moves” the entire website to the side instead of overlaying it.
Final thoughts
This article gave you a useful list of the most amazing free Bootstrap sidebar navigation menu templates that you can integrate into your website. If you have some web development skills, you can easily build this kind of sidebars.
But making them takes time.
If you’re looking for free Bootstrap menu templates, take a look at this article.
What’s even more amazing, we have hundreds of full Bootstrap templates that you can use for your projects.
Thank you for visiting Colorlib and reading this article! We highly appreciate it! Now you might want to learn how to make a website using our free WordPress themes.
Share This
Aigars Silkalns
Frontend web developer and web designer specialized in WordPress theme development. After graduating with BBA he self-though frontend web development. Currently, has over 10 years of experience in mainly CSS, HTML (TailwindCSS, Bootstrap), JavaScript (React, Vue, Angular) and PHP. Obsessed with application performance, user experience and simplicity.
Related Posts
These best Bootstrap drag and drop layouts result from our careful review of multiple available…
After thoroughly researching free HTML and CSS3 table templates for months, we decided to take…
We were using 3rd-party free booking form templates for prototyping, but there was always this…
After studying and testing Bootstrap modals from around the web for months, we decided to…
You will find some of our best contact form designs based on HTML and CSS…
We designed and developed the most versatile collection of free Bootstrap wizards for any web…
Навигационная панель
Документация и примеры адаптивной панели навигации. Включает поддержку брендинга, навигации с поддержкой нашего плагина для свертывания.
Как это работает
Вот что вам надо знать перед использованием навбара:
Бренд
.navbar-brand может применяться к большинству элементов, но якорь работает лучше всего, поскольку для некоторых элементов могут потребоваться служебные классы или пользовательские стили.
Текст
Изображение
Изображение и текст
Навбар
И т.к. мы используем классы в наших навбарах, вы можете избегать «списочного» подхода к разметке при необходимости.
Формы
Размещайте различные элементы управления и компоненты формы на панели навигации:
Разные кнопки поддерживаются как часть этих форм в навбарах. Это также хорошее напоминание о том, что утилиты вертикального выравнивания можно использовать для выравнивания элементов различных размеров.
В составе этих форм навигационной панели также поддерживаются различные кнопки. Это также отличное напоминание о том, что утилиты вертикального выравнивания можно использовать для выравнивания элементов разного размера.
Текст
Смешивайте и добивайтесь необходимого соответствия с другими компонентами и утилитами, как вам надо.
Цветовые схемы
Контейнеры
Используйте любой из адаптивных контейнеров, чтобы изменить ширину содержимого на панели навигации.
Размещение
Прокрутка
Отзывчивое поведение
Тогглер (кнопка разворачивания меню)
С названием бренда слева и переключателем справа:
С переключателем слева и названием бренда справа:
Внешнее содержимое
Collapsed content
21 Bootstrap Sidebars
Collection of free Bootstrap sidebar code examples: responsive sidebars, side navbar, sidebar menu, vertical navbar, etc. Update of June 2020 collection. 2 new items.
Related Articles
Author
Links
Made with
About a code
Bootstrap 5 Sidebar Menu with Toggle Button
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Bootstrap version: 5.0.0
Author
Links
Made with
About a code
Bootstrap 4 Sidebar Menu
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap 4.1.3 Sidebar Nav
Cool Bootstrap sidebar navigation modified for Bootstrap 4.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, animate.css, tether.css, jquery.js, popper.js, tether.js
Bootstrap version: 4.1.3
Author
Links
Made with
About a code
Bootstrap Sidebar
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js
Bootstrap version: 3.3.7
Author
Links
Made with
About a code
Bootstrap Sidebar
Collapsible sidebar using Bootstrap 4.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.1.0
Author
Links
Made with
About a code
Bootstrap Sidebar #04
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #09
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #08
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #07
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #05
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #03
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap Sidebar #01
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js, popper.js
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
Bootstrap 4.1.3 Sidebar Nav
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: animate.css, font-awesome.css, tether.css, popper.js, jquery.js
Bootstrap version: 4.1.3
Author
Links
Made with
About a code
Pro Sidebar
Responsive sidebar template with dropdown menu based on Bootstrap framwork.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, mcustomscrollbar.css, jquery.js, popper.js, mcustomscrollbar.js
Bootstrap version: 4.2.1
Author
Links
Made with
About a code
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Bootstrap version: 3.3.7
Author
Links
Made with
About a code
Fixed Bootstrap Sidebar
This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Bootstrap version: 3.3.7
Author
Links
Made with
About a code
Bootstrap Navbar Sidebar
Use classic Bootstrap navbar as sidebar, on left or right side.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Bootstrap version: 4.3.1
Author
Links
Made with
About a code
SideNav
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Bootstrap version: 3.3.6
Author
Links
Made with
About a code
Sidebar Menu
jQuery sidebar-menu component.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js
Bootstrap version: 3.3.6
Author
Links
Made with
About a code
Bootstrap SideBar Menu
Simple sidebar admin menu responsive with Bootstrap.
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari
Dependencies: font-awesome.css, jquery.js
Bootstrap version: 3.3.5
Author
Links
Made with
About a code
Responsive Bootstrap Menu Sidebar
Compatible browsers: Chrome, Edge, Firefox, Opera, Safari