Vue Sidebar Component API
Sidebar API
Explore the API reference for the Vue Sidebar component and discover how to effectively utilize its props for customization.
import { CSidebar } from '@coreui/vue'
| Property | Default | Type |
|---|
Sets if the color of text should be colored for a light or dark background. |
Make sidebar narrow. |
Set sidebar to overlaid variant. |
Components placement, there’s no default placement. |
Place sidebar in non-static positions. |
Control the open state. When set, the sidebar renders what show says and close gestures only emit update:show — nothing changes until the parent flips the prop. |
Size the component small, large, or extra large. |
Expand narrowed sidebar on hover. |
Toggle the visibility of sidebar component. Use show / v-model:show instead — visible is ignored when show is set. |
| Event name |
|---|
Callback fired when the component requests to be hidden. |
Event emitted when the sidebar enters or leaves the viewport — the sidebar is off-canvas on narrow screens, so this reports whether it is on screen, not the show state. |
Callback fired when the component requests to be shown. |
Callback fired when the sidebar requests an open-state change — a close gesture (the mobile backdrop click, an outside click or a nav link selection on mobile) or any internal toggle. When show is bound with v-model, update it yourself, or the sidebar stays as it is. |
Event emitted after visibility of component changed. |
import { CSidebarBrand } from '@coreui/vue'
| Property | Default | Type |
|---|
| as | 'div' | string |
Component used for the root node. Either a string to use a HTML element or a component. |
| href | - | string |
The href attribute specifies the URL of the page the link goes to. |
import { CSidebarFooter } from '@coreui/vue'
import { CSidebarHeader } from '@coreui/vue'
import { CSidebarNav } from '@coreui/vue'
| Property | Default | Type |
|---|
Component used for the root node. Either a string to use a HTML element or a component. |
Make navigation more compact by cutting link padding in half. |
Sets the navigation variant. |
import { CSidebarToggler } from '@coreui/vue'