Skip to content
On this page

Sidebar

A sidebar to use as left/right overlay or static

Base


Show code

Static

Show code

Class props


How does 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.


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

Style

📄 Full scss file

CSS VariableSASS VariableDefault
--oruga-sidebar-overlay$sidebar-overlayhsla(0,0%,4%,.86)
--oruga-sidebar-box-shadow$sidebar-box-shadow5px 0px 13px 3px rgba($black, 0.1)
--oruga-sidebar-content-background-color$sidebar-content-background-color$grey-lighter
--oruga-sidebar-mobile-width$sidebar-mobile-width80px
--oruga-sidebar-width$sidebar-width260px
--oruga-sidebar-zindex$sidebar-zindex38

Released under the MIT License.