Modals & overlays

Components

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