Hosted onlinkforest.hyper.mediavia theHypermedia Protocol

Pattern: Modals

Pattern: Modals, Drawers & Dialogs

Manage modal, dialog, and drawer state with explicit open/close transitions.

Overview

Modals have clear states: closed, opening, open, closing. A state machine prevents double-opens, ensures proper cleanup on close, and coordinates nested dialogs.

Key Concepts


    States: closed → opening → open → closing → closed

    Guard conditions for conditional closes (unsaved changes)

    Nested dialog stacks

    Esc key handling and backdrop clicks

Related Pages


TODO


    Add modal stack machine

    Add keyboard event handling

    Add accessibility state management

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime