Skip to content

Side Drawer ​

BsSideDrawer is a lightweight component's container which is used to house application navigation, logo and others.

Updated in v2.2.0

Overview ​

BsSideDrawer is usually used to house your application navigation. It works well with BsAppbar and can automatically adapt to the screen size. Background color can be modified using global CSS variables.

Location ​

BsSideDrawer support 2 position location: left and right. Use position property with value left or right to change the position location.

Added in v2.0.0

Mini Side Drawer ​

BsSideDrawer also support mini size. Sets the mini property to true to enable the mini Side Drawer. You can adjust the width of <bs-side-drawer> on minimize state using the mini-width property.

Usage Example ​

The following are a collection of examples that demonstrate more advanced use of the <bs-side-drawer>.

With Appbar ​

Clipped Side Drawer ​

CSS Variables ​

As CSS technology evolves, Vue MDBootstrap introduces global CSS variables for better customization.

Added in v2.2.0
css
:root {
  --sidedrawer-background: oklch(0.969 0.005 247.877);
  --sidedrawer-foreground: var(--foreground);

  /* navigation */
  --sidedrawer-item-foreground: var(--foreground);
  --sidedrawer-item-foreground-secondary: var(--foreground-subtle);
  --sidedrawer-item-foreground-subtle: var(--foreground-subtle-secondary);
  --sidedrawer-item-active-background: oklch(0.65 0.13 294.86 / 0.3);
  --sidedrawer-item-active-foreground: oklch(42.17% 0.12 293.75deg);
  --sidedrawer-item-active-foreground-secondary: oklch(42.17% 0.12 293.75deg / 0.75);
  --sidedrawer-item-hover-background: oklch(46.85% 0.12 293.75deg / 0.1);
  --sidedrawer-item-hover-foreground: var(--foreground);
  --sidedrawer-item-border-indicator: var(--md-field-active-indicator);
  --sidedrawer-item-divider-color: var(--border-translucent);
  --sidedrawer-item-expanded-background: oklch(0 0 0 / 0.03);
}

API Reference ​

Released under the BSD-3-Clause License.