Any Screen Can Be a Modal
Context switching is expensive. When you're reviewing a list of records and want to check one detail, navigating to a full detail page and then navigating back breaks your flow. You lose your scroll position, your place in the list, and the mental context of what you were doing.
Modals solve this — but traditionally, building a modal version of a screen meant duplicating the screen, stripping it down, and wiring it into a separate overlay system. That's twice the work for what should be a presentation choice, not an architectural decision.
In Swifty, every screen can open as a modal without any modification to the screen itself.
The Same Screen, Two Presentations
A screen definition describes what a screen contains and how it behaves. It doesn't need to know whether it will open as a full page or as a popup. That's a calling-side decision.
When a button, a link, or a list row action opens a screen as a modal, the platform renders the same screen definition inside an overlay. All the same data loading, all the same interactions, all the same form behavior — just in a contained panel rather than the full browser window.
When the same screen is navigated to directly via its URL, it renders as a full page with the standard layout.
Works for Any Screen Type
Detail views, create forms, edit forms, and lists all support modal rendering:
- Detail modals: Click a record in a summary widget to see its full detail without leaving the current page
- Create modals: Open a new record form as an overlay, submit, and return to the originating view with the list refreshed
- Edit modals: Quick edits without navigating away from context
- List modals: Show a filtered sub-list in an overlay, useful for exploring related records
Configurable Size
Modal screens open at a sensible default size. For screens with more content, you can configure the modal to open wider or taller. For quick confirmation-style screens, smaller sizes keep the interaction focused.
Close Behavior
After a successful action in a modal — a form save, a delete confirmation — the modal closes automatically and the underlying view refreshes to reflect the change. The user returns to exactly where they were, with updated data visible without any manual refresh.
This makes modals feel like a natural part of navigation rather than a separate system layered on top.