Simple and fast sidebar skeleton built on Bootstrap 5.
npm install sidebar-skeleton-compostrapImport the styles and initialize the components in your JavaScript entry point:
import 'sidebar-skeleton-compostrap/sidebar.css';
import { SidebarSkeleton } from 'sidebar-skeleton-compostrap';
// Initialize both Sidebar and ThemeSwitcher
SidebarSkeleton.init();Alternatively, you can initialize components individually:
import { Sidebar, ThemeSwitcher } from 'sidebar-skeleton-compostrap';
Sidebar.init();
ThemeSwitcher.init();Simple and fast sidebar skeleton is built on Bootstrap. You should be familiar with Bootstrap usage and have basic knowledge of Sass, npm.
When using a navbar, extend the class called wrapper:
| Navbar | Class |
|---|---|
| unused | wrapper |
| Used | wrapper-navbar-used |
| Used (fixed) | wrapper-navbar-fixed |
| Description | Class |
|---|---|
| Right top rounded in sidebar | sidebar-rounded-top-right |
| Fixed menu in sidebar | sidebar-menu-fixed |
The sidebar supports light and dark themes via the data-sidebar-theme attribute.
The theme switcher (theme-switcher.js) automatically persists the user's choice in the browser's localStorage, so the selected theme is remembered on subsequent visits.
| Theme | Attribute |
|---|---|
| Light | data-sidebar-theme="light" |
| Dark | data-sidebar-theme="dark" |
If you want your own toggle button visible at all resolutions, update the class in sidebar.js:
| Description | Class |
|---|---|
| Visible in small devices | sidebar-toggle |
| Visible all resolution | sidebar-toggle-visible |