Browse documentation

Drawer

Present secondary content in a panel attached to a window edge.

Import

Load the optional component layer before using the examples below.

Ruby
require "zaniah/ui"

Side panel

Drawer has the modal behavior of Dialog plus side: :left or :right.

Rendered example
A dark-theme drawer sliding in from the right.
Rendered by Zaniah's headless backend.
Ruby
Zaniah::UI::Drawer.new(
  Zaniah::UI::Label.new("Inspector"),
  title: "Properties", side: :right)

API summary

Constructor options and behaviors are drawn from the component reference.

ComponentConstructor and methodsVariants or behavior
DrawerModal plus side:left/right

Accessibility

A drawer is a modal dialog: focus stays inside while it is open and returns on close.

ComponentSemantic role
Drawerdialog/modal