Modals & overlays

Components

Component

A panel that slides in from any edge (bottom, top, left or right) with a grab handle and is dismissed by dragging it back. Releasing past 35% of its size or with enough speed closes it; otherwise it springs back, and dragging the wrong way meets rubber-band resistance. Bottom sheets can rest at snap points such as 30%, 60% and 92%, the backdrop fades with the drag, and an optional stack target scales the page behind for a layered feel. Modal sheets trap focus, lock page scroll and return focus to the trigger; non-modal sheets leave the page usable, which suits a mini player. The handle is a button: arrow keys move between snap points and Escape closes. Scrollable content only starts a drag from the top, and reduced motion swaps the spring for a short linear slide.

Modals & overlays · Chomodo Studio 0 likes 0 installs
Component

A preview card that grows into a centred dialog and shrinks back into place. The dialog opens out of the card's rectangle while the shared image and title travel and resize to their dialog positions, and the rest of the dialog fades in a beat later. Closing shrinks back into wherever the card is now, even after the page scrolled. On touch the dialog can be dragged down to close with the backdrop fading, and gallery mode adds previous and next controls plus arrow keys to move between cards. Built from small parts (CardExpand, Item, Trigger, Content, Image, Title, Description, Close). The dialog is modal and labelled by its title, focus moves to Close and stays inside, Escape closes, focus returns to the card and the page behind is inert. Reduced motion uses a plain fade.

Modals & overlays · Chomodo Studio 0 likes 0 installs