GitHub

Drawer

Sliding overlay panel from any edge with contained mode and htmx support.

<rhx-drawer>

Examples

End (Default)

Start

Top and Bottom

Contained

Main content area. The drawer opens within this container.

htmx Integration

Properties

Property Type Default Description
id string - Element ID used for open/close triggers
rhx-label string - Title text displayed in the drawer header
rhx-placement string end Slide direction: start, end, top, bottom
rhx-contained bool false Position relative to parent instead of viewport
rhx-no-header bool false Hides the default header

Accessibility

  • Uses role="dialog" for screen reader announcement.
  • Focus is trapped within the drawer while it is open.
  • ESC key closes the drawer and returns focus to the trigger element.
  • aria-label is set from the rhx-label attribute.
  • Backdrop overlay prevents interaction with background content.