Sidebar
A sidebar to use as left/right overlay or static
# Static
# API
Sidebar
Name | Description | Type | Values | Default |
---|---|---|---|---|
open | To control the behaviour of the sidebar programmatically, use the .sync modifier to make it two-way binding | Boolean | — | false |
position | Set display position of sidebar | String | fixed ,static ,absolute | fixed |
type | Type (color) of the background, optional | String, | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | — |
can-cancel | Can close Sidebar pressing escape or clicking outside | Boolean, Array | escape , outside | ['escape', 'outside'] |
on-cancel | Callback function to call after user canceled (clicked 'X' / pressed escape / clicked outside) | Function | — | — |
fullwidth | Show sidebar in fullwidth. A close button will be present for a fullwidth sidebar. | Boolean | - | false |
fullheight | Show sidebar in fullheight. | Boolean | - | false |
mobile | Custom layout on mobile | String | fullwidth ,reduce ,hide | — |
right | Show the sidebar on right | Boolean | false | |
overlay | Show an overlay when sidebar is open | Boolean | — | false |
expand-on-hover | Expand sidebar on hover when reduced or mobile is reduce | Boolean | — | false |
expand-on-hover-fixed | Expand sidebar on hover with fixed position when reduced or mobile is reduce | Boolean | — | false |
reduce | Show a small sidebar | Boolean | — | false |
scroll | clip to remove the <body> scrollbar, keep to have a non scrollable scrollbar
to avoid shifting background, but will set <body> to position fixed, might break some layouts | String | clip , keep | clip |
delay | Sidebar delay before it open (number in ms) | Number | — | 0 |
# Variables
You can use these variables to customize this component.
Name | Default |
---|---|
$sidebar-background | $modal-background-background-color |
$sidebar-box-shadow | 5px 0px 13px 3px rgba($black, 0.1) |
$sidebar-width | 260px |
$sidebar-mobile-width | 80px |
$sidebar-mobile-breakpoint | $tablet |
$sidebar-colors | $navbar-colors |
This page is open source. Noticed a typo or something's unclear?