Vue Drawer Component API
Drawer API
Explore the API reference for the Vue Drawer component and discover how to effectively utilize its props for customization.
CDrawer
import { CDrawer } from '@coreui/vue'
Props
| Property | Default | Type |
|---|
| animation | true | boolean |
How the drawer comes in. Left out it slides in from its placement; false turns the animation off. |
| backdrop | true | boolean, string |
Apply a backdrop while the drawer is open. 'static' keeps it open on a backdrop click and bounces it instead. |
| backdropVariant6.0.0+ | - | string |
Pick the backdrop's look: the dark scrim or the translucent tint of the page. Left out, the component keeps its own default. |
| dark6.0.0+ | - | boolean |
Flip the drawer to the dark color mode, whatever the page around it uses. |
| fitContent | - | boolean |
Size the drawer to its content instead of the full edge. |
| fullscreen | - | boolean |
Set the drawer to cover the entire user viewport. |
| keyboard | true | boolean |
Closes the drawer when escape key is pressed. |
| placement | - | string |
The edge the drawer slides in from. A fullscreen drawer covers the viewport and needs none. |
| responsive | true | boolean, string |
Hide the drawer outside the viewport from a specified breakpoint and down. |
| scroll | false | boolean |
Allow the page behind the drawer to scroll. |
| sheet | - | boolean |
Drop the inset and the rounded corners, so the drawer sits flush against the edge. |
| show6.0.0+ | undefined | boolean |
Control the open state. When set, the drawer renders what show says and dismiss gestures only emit update:show — nothing closes until the parent flips the prop. |
| translucent | - | boolean |
Blur and saturate whatever is behind the drawer. |
| visibleDeprecated 6.0.0 | undefined | boolean |
Toggle the visibility of the drawer component. Use show / v-model:show instead — visible is ignored when show is set. |
Events
| Event name |
|---|
| close |
Callback fired once the component has closed. |
| close-prevented |
Callback fired when a static backdrop or a disabled keyboard refuses a close request. |
| show |
Callback fired when the component requests to be shown. |
| update:show |
Callback fired when the drawer requests an open-state change — a dismiss gesture (Escape, backdrop click) or any internal toggle. In controlled mode update show yourself, or the drawer stays as it is. |
CDrawerBody
import { CDrawerBody } from '@coreui/vue'
import { CDrawerFooter } from '@coreui/vue'
import { CDrawerHeader } from '@coreui/vue'
CDrawerTitle
import { CDrawerTitle } from '@coreui/vue'