WireScript
Components

modal

Centered modal dialog.

A centered modal dialog overlay. Defined inside screens and triggered by :to "#id".

Usage

Opening a Modal

(button "Open Modal" :to "#my-modal")

Closing a Modal

(button "Close" :to :close)

Properties

accepts contentaccepts children

Identity

PropertyTypeDefault
:idstring-

Spacing

PropertyTypeDefault
:gapnumber0
:paddingnumber0

Dimensions

PropertyTypeDefault
:widthany-
:heightany-

Position

PropertyTypeDefault
:positionsymbol-
:topflag-
:bottomflag-
:leftflag-
:rightflag-

State

PropertyTypeDefault
:openflag-

Content

PropertyTypeDefault
:titlestring-

Note: Default max width is 600px or 90% of container.

Examples

Initially Open Modal

Confirmation Modal

Form Modal

Info Modal

Image Preview Modal

Multi-step Modal

On this page