Skip to content
On this page

Sidebar โ€‹

A sidebar to use as left/right overlay or static

Examples โ€‹

Base

Show code

Static

Show code

Class props โ€‹

'Classes applied to the element'
Lightweight UI components for Vue.js
Example 1
Example 2
Example 3
Example 4
Example 5
How does the Class props inspector work?
Class propDescriptionPropsSuffixes
absoluteClassClass of the sidebar when its position is absolute.
๐Ÿ‘‰ Scroll to the top of this page to see the sidebar
position
contentClassClass of the sidebar content.
expandOnHoverClassClass of the sidebar when expanded on hover.expandOnHover
expandOnHoverFixedClassClass of the sidebar when expanded on hover and its position is fixed.expandOnHover
expandOnHoverFixed
fixedClassClass of the sidebar when its position is fixed.position
fullheightClassClass of the sidebar when is fullheight.fullheight
fullwidthClassClass of the sidebar when is fullwidth.fullwidth
hiddenClassClass of the sidebar when sidebar is hidden.
mobileClassClass of sidebar component when on mobile.
๐Ÿ‘‰ Switch to mobile view to see it in action!
overlayClassClass of the sidebar overlay.
reduceClassClass of the sidebar when reduced.reduce
rightClassClass of the sidebar when is positioned on the right.right
rootClassClass of the root element.
staticClassClass of the sidebar when its position is static.position
variantClassClass of the sidebar variant.variantprimary
info
warning
danger
visibleClassClass of the sidebar when sidebar is visible.
html
<o-sidebar></o-sidebar>

Props โ€‹

Prop nameDescriptionTypeValuesDefault
canCancelSidebar cancel optionsarray|booleantrue, false, 'escape', 'outside'
From config:
sidebar: {
ย ย canCancel: ['escape', 'outside']
}
expandOnHoverExpand sidebar on hover when reduced or mobile is reduceboolean-
expandOnHoverFixedExpand sidebar on hover with fixed position when reduced or mobile is reduceboolean-
fullheightShow sidebar in fullheightboolean-
fullwidthShow sidebar in fullwidthboolean-
mobileCustom layout on mobilestringfullwidth, reduced, hidden
mobileBreakpointMobile breakpoint as max-width valuestring-
onCancelCallback on cancelfunc-Default function (see source code)
openTo control the behaviour of the sidebar programmatically, use the v-model:open to make it two-way bindingboolean-
overlayShow an overlay like modalboolean-
overrideboolean-
positionSkeleton position in relation to the windowstringfixed, absolute, static
From config:
sidebar: {
ย ย position: 'fixed'
}
reduceShow a small sidebarboolean-
rightShow the sidebar on rightboolean-
scrollstring-
From config:
sidebar: {
ย ย scroll: 'clip'
}
variantColor of the sidebar, optionalstring|objectprimary, info, success, warning, danger, and any other custom color

Events โ€‹

Event namePropertiesDescription
update:open
close

Slots โ€‹

NameDescriptionBindings
default

Sass variables โ€‹

Current theme โžœ Oruga Base

SASS VariableDefault
$sidebar-overlayhsla(0, 0%, 4%, 0.86)
$sidebar-box-shadow5px 0px 13px 3px rgba($black, 0.1)
$sidebar-content-background-color$grey-lighter
$sidebar-mobile-width80px
$sidebar-width260px
$sidebar-zindex38

See โžœ ๐Ÿ“„ Full scss file

Current theme โžœ Oruga Full

SASS VariableDefault
$sidebar-overlayhsla(0, 0%, 4%, 0.86)
$sidebar-box-shadow5px 0px 13px 3px rgba($black, 0.1)
$sidebar-content-background-color$grey-lighter
$sidebar-mobile-width80px
$sidebar-width260px
$sidebar-zindex38

See โžœ ๐Ÿ“„ Full scss file

Current theme โžœ Bulma

The theme does not have any custom variables for this component.

Current theme โžœ Bootstrap

SASS VariableDefault
$sidebar-reduced-width5rem
$sidebar-reduced-height10vh

See โžœ ๐Ÿ“„ Full scss file

Released under the MIT License.