Drawer
A panel that slides in from the edge of the screen for details or a form.
<template> <Drawer v-model:open="open" title="SQL injection in login handler" size="lg"> Content </Drawer></template>Props
| Name | Type | Default |
|---|---|---|
| size | "sm" | "md" | "lg" | "xl" | "md" |
| title | string | - |
| closeLabel | string | "Close" |
| ...props | USlideover props (side, overlay, dismissible, ...) | - |
Slots
| Name | Description |
|---|---|
| default | The scrollable body content, below the tray header. |
| meta | A secondary metadata row under the title (links, tags, badges) - only renders its wrapper row if provided. |
| actions | A right-aligned action cluster in the tray header (dropdowns, buttons) - only renders its wrapper row if provided. |
| nav-leading | Extra controls in the top nav bar's left cluster, after the always-present close button - e.g. a maximize button. |
| nav-trailing | Content in the top nav bar's right cluster - e.g. prev/next navigation. Only renders its wrapper row if provided. |
| footer | Forwarded to USlideover's own #footer slot, unstyled. |
| content | Full escape hatch, forwarded to USlideover's own #content slot with `close` on its scoped slot - bypasses this component's entire shell (top nav bar, tray header, body) for a drawer that doesn't fit it at all. |
Guidelines
Do
- Use
titlefor the tray header,#metafor a secondary metadata row under it (links, tags, badges), and#actionsfor a right-aligned action cluster (dropdowns, buttons) - mirrors finding-detail.vue's own drawer. - Use
#nav-leading/#nav-trailingfor extra top-bar controls (a maximize button, prev/next navigation) - the close button is always there; these are additions beside it. - Pick
sizebased on content density:smfor a short detail panel,mdfor a form or document,lg/xlfor a table or a side-by-side diff.
- Fall back to
#contentonly when this shell genuinely doesn't fit (e.g. a single-row header with no separate nav bar) - it bypasses everything else and hands you the rawclosecallback.
Don't
- Don't hand-roll the top nav bar or tray header inside the default slot - that duplicates what
title/#meta/#actions/#nav-leading/#nav-trailingalready provide. - Don't reach for a one-off
w-[...]override on:ui.content- pick the closestsizetier instead.