Vue Offcanvas Component API

Offcanvas API

Explore the API reference for the Vue Offcanvas component and discover how to effectively utilize its props for customization.

COffcanvas

jsx
import { COffcanvas } from '@coreui/vue'

Props

PropertyDefaultType
animation6.0.0+trueboolean

Remove animation to create an offcanvas that simply appears rather than slides into view.

backdroptrueboolean, string

Apply a backdrop on body while offcanvas is open. 'static' keeps it open on a backdrop click and bounces it instead.

dark-boolean

Sets a darker color scheme.

keyboardtrueboolean

Closes the offcanvas when escape key is pressed.

placement-string

Components placement, there’s no default placement.

responsive4.7.0+trueboolean, string

Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down.

scrollfalseboolean

Allow body scrolling while offcanvas is open

show6.0.0+undefinedboolean

Control the open state. When set, the offcanvas renders what show says and dismiss gestures only emit update:show — nothing closes until the parent flips the prop.

visibleDeprecated 6.0.0undefinedboolean

Toggle the visibility of offcanvas component.

Use show / v-model:show instead — visible is ignored when show is set.

Events

Event name
hide

Callback fired once the component has been hidden.

show

Callback fired when the component requests to be shown.

update:show

Callback fired when the offcanvas requests an open-state change — a dismiss gesture (Escape, backdrop click) or any internal toggle. In controlled mode update show yourself, or the offcanvas stays as it is.

COffcanvasBody

jsx
import { COffcanvasBody } from '@coreui/vue'

COffcanvasHeader

jsx
import { COffcanvasHeader } from '@coreui/vue'

COffcanvasTitle

jsx
import { COffcanvasTitle } from '@coreui/vue'
PropertyDefaultType
as'h5'string

Component used for the root node. Either a string to use a HTML element or a component.