Three windows over the page, all the browser's own modal dialog: a dialog for work, an alert dialog for a question that must be answered, a drawer that slides in from an edge. Each opens by a flag the page holds, written back when it closes.
Dialog
Escape and a press outside close it. There is no trigger part: any press that sets the flag opens it.
One lineA title, a description and a cross; the children go under them.
open: false
Result
nothing yet
Parts, with a formDialogContent lays out a header, anything, and a footer. DialogClose is a button that closes after its press.
AL
Ada Lovelace@ada
No close button, a widthshowCloseButton=false leaves the footer as the only way out besides Escape and a press outside.
copied 0 times
Scrolling contentThe dialog keeps its header and footer; a box inside scrolls.
not answered
A form that checks firstA plain Button keeps the dialog open until the form is good, then sets the flag false itself.
ProjectsNone yet. Make one.
Alert dialog
A question the reader must answer: role=alertdialog, and a press outside does not close it. Action and Cancel both close after their press.
Default512 wide, the words at the start, the buttons at the end.
Answer
nothing yet
Small, with media, destructivesize="sm" is 320 wide with centred words; the footer is told to centre.
Kitchen quote
Oak door sizes
Invoice 0412
3 of 3 chats
Default size with media, an action that waitsThe action is disabled until the box is ticked; Cancel takes another variant.
signed in
Drawer
A modal that slides in from an edge. Draw it towards the edge to close it, by its handle, its header or (a finger) anywhere on it; or press outside, or Escape. With modal=false it stays on the page instead, at a peek.
Each side, a control insideOne drawer, its direction a state. Left and right have a slim handle on their inner edge.
bottom
350Daily goalcalories
bottomLast opened from
Submitted
nothing yet
Snap pointsIt opens at 45% of its height; draw it up for all of it, down to step back and then to close. The content scrolls.
open: false
Controls inside, no handlehandle=false: only the buttons, Escape and a press outside close it. What it changes is live behind it.
Wi-Fi on
Do not disturb off
Brightness 70%
One that stays on the pagemodal=false: at the foot of the window, showing its peek, with the page alive behind it. Press its header or its handle, or draw it up; Escape, or a drag down from the top of its list, brings it back to the peek.