modal
Installation
SKILL.md
This skill demonstrates how to create progressively complex modal dialogs using the modern native browser Popover API. It builds upon the concepts from the popover-api skill but focuses specifically on modal implementations.
All examples follow the principle of using popover="manual" to maintain full control over when modals open and close, preventing automatic dismissal when clicking outside the modal.
This skill ships with the files the examples depend on. They live next to this document:
- assets/Modal.tsx - the React
Modalcomponent used by every example below - assets/Modal.css - styles for the component (imported by
Modal.tsxas./Modal.css)
When asked to create a modal for the first time in a project: