Hacktron Design System

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"
titlestring-
closeLabelstring"Close"
...propsUSlideover props (side, overlay, dismissible, ...)-

Slots

Name Description
defaultThe scrollable body content, below the tray header.
metaA secondary metadata row under the title (links, tags, badges) - only renders its wrapper row if provided.
actionsA right-aligned action cluster in the tray header (dropdowns, buttons) - only renders its wrapper row if provided.
nav-leadingExtra controls in the top nav bar's left cluster, after the always-present close button - e.g. a maximize button.
nav-trailingContent in the top nav bar's right cluster - e.g. prev/next navigation. Only renders its wrapper row if provided.
footerForwarded to USlideover's own #footer slot, unstyled.
contentFull 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 title for the tray header, #meta for a secondary metadata row under it (links, tags, badges), and #actions for a right-aligned action cluster (dropdowns, buttons) - mirrors finding-detail.vue's own drawer.
  • Use #nav-leading/#nav-trailing for extra top-bar controls (a maximize button, prev/next navigation) - the close button is always there; these are additions beside it.
  • Pick size based on content density: sm for a short detail panel, md for a form or document, lg/xl for a table or a side-by-side diff.
  • Fall back to #content only 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 raw close callback.

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-trailing already provide.
  • Don't reach for a one-off w-[...] override on :ui.content - pick the closest size tier instead.