Back

Modal

Structured Modal

Using ModalHeader, ModalBody, and ModalFooter.

Nested Modals

Stack multiple modals on top of each other. Z-index and interactions are managed automatically.

Sizes

Behaviour

  • Clicking the backdrop closes the top-most modal
  • Escape closes only the top-most modal
  • Focus is trapped inside the active modal
  • Body scroll is locked while any modal is open

Usage

@overlays.Modal(overlays.ModalProps{ ID: "id", Size: "md" }) {
    @overlays.ModalHeader("Title")
    @overlays.ModalBody() {
        Content...
    }
    @overlays.ModalFooter() {
        <button>Actions</button>
    }
}