Skip to content
Docs version
@hungpvq/draggable@1.3.1@hungpvq/vue-draggable@1.3.1@hungpvq/react-draggable@1.3.1

Header slots

Stable header chrome layout for draggable item shells (popup, modal, drawer, float, sidebar, bottom). Documented slot / prop names are Stable — renaming them is a major.

Related: Stable API · Docs hub

Layout

[ pre-title ] [ title | after-title ] …… spacer …… [ extra-btn ]
  • pre-title — left of the title group (e.g. back / drag handle host).
  • title — plain string for switcher/store (title prop) and/or custom node (#title / titleNode on sidebar).
  • after-title — immediately to the right of the title (same title group), before the spacer.
  • extra-btn — trailing actions after the spacer (close / expand / custom buttons).

DragHeader (internal) implements this layout; public item components forward the same names.

Vue ↔ React names

Vue slotReact prop / nodeRole
pre-titlepreTitleBefore the title group
title (prop)titlePlain string (switcher menu + default header)
title (slot)titleNodeCustom header title node (sidebar); falls back to title
after-titleafterTitleImmediately after title, before spacer
extra-btnextraBtnTrailing header actions after the spacer
defaultchildrenPanel body (not part of the header row)

Rules

  1. Hosts that place actions “in the title” (e.g. menu location: 'title') must map those into the after-title / afterTitle slot — not extra-btn.
  2. React sidebar: use title (string) for the switcher store label; use titleNode for a custom header node (Vue #title slot). Other shells may still pass a display title node where noted.
  3. When the visible header differs from the switcher label, set both a plain title string and a styled #title / titleNode.
  4. Do not place trailing chrome (close, expand, switcher) in after-title; those belong in extra-btn / built-in header actions.
  5. Not every shell exposes every slot (e.g. some omit pre-title). Names that are documented on a component remain Stable for that surface.

Component docs

ComponentDoc
Popupdraggable-item-popup.md
Modaldraggable-modal.md
Drawerdraggable-drawer.md
Floatdraggable-item-float.md
Sidebardraggable-item-sidebar.md
Bottomdraggable-item-bottom.md