Actions

Drawer

A Sheet that rises from the bottom edge of the screen.

Class nameTypeDescription
sheetplf:sheetComponentA Modal dialog as a panel
sheet-handleplf:sheet-handlePartA decorative handle
sheet-headerplf:sheet-headerPartTitle and description, centered below md
sheet-titleplf:sheet-titlePartThe panel's heading
sheet-descriptionplf:sheet-descriptionPartMuted text under the title
sheet-bodyplf:sheet-bodyPartThe scrolling content
sheet-footerplf:sheet-footerPartActions stacked in source order, primary first
sheet-bottomplf:sheet-bottomPlacementFrom the bottom edge

Archive project?

The project moves to Archive. You can restore it at any time.

The handle cannot be dragged, so always include a visible close action such as Cancel.

With a form

Give the form method="dialog", which closes the drawer when it is submitted, and link the footer’s submit button to it with the form attribute.

Edit profile

Changes apply after you save.

Scrolling body

Give a body without focusable content tabindex="0", role="region" and an aria-label.

Release notes

Everything that changed this month.

Search remembers your recent queries.

Tables keep their header visible while you scroll.

File uploads accept files from the clipboard.

Date pickers keep keyboard focus visible.

Notifications pause while you hover them.

Sidebars remember their collapsed state.

Charts follow the dark theme.

Thank you for your feedback.

JavaScript

Drawer needs Modal’s JavaScript. The Full script (pelatform-ui.min.js) starts every component on page load, with no code of your own; with ESM imports, call init() yourself, as in Installation. For markup you add later, see Dynamic content.

<link rel="stylesheet" href="pelatform-ui.min.css">
<script src="pelatform-ui.min.js" defer></script>
<link rel="stylesheet" href="pelatform-ui.prefixed.min.css">
<script src="pelatform-ui.min.js" defer></script>

Drawer adds no hooks, methods or events: use Modal’s triggers, methods, events and keyboard.

React

Drawer has no component of its own in @pelatform/react: it is a Sheet with side="bottom", and SheetHandle renders its handle.

Variable Default
--plf-drawer-bg, --plf-drawer-color --plf-modal-bg and --plf-modal-color, then surface and text
--plf-drawer-border Top edge: --plf-modal-border, then subtle border
--plf-drawer-radius Extra large radius (12px), on the top corners
--plf-drawer-shadow --plf-modal-shadow, then large shadow
--plf-drawer-backdrop-bg --plf-modal-backdrop-bg, then --plf-color-backdrop
--plf-drawer-padding Space 4 (16px)
--plf-drawer-content-width 32rem, the centered content width
--plf-drawer-max-height 80dvh
--plf-drawer-handle-color --plf-color-surface-muted

The panel adds the screen’s safe-area insets, which browsers report only when the viewport meta tag includes viewport-fit=cover.


Built with Pelatform UIv0.1.0

Components

Getting started

Foundations

Components

Actions

Data display

Navigation

Feedback

Data input

Layout

Advanced

Integrations

Blocks

Application

Authentication

Icons