Unpoly allows you to open page fragments in an overlay. Overlays may be stacked infinitely.
A variety of overlay modes are supported, such as modal dialogs, popup overlays or drawers. You may customize their appearance and behavior.
Layers are isolated, meaning a screen in one layer will not accidentally see elements or events from another layer. For instance, fragment links will only update elements from the current layer unless you explicitly target another layer.
Overlays allow you to break up a complex screen into subinteractions. Subinteractions take place in overlays and may span one or many pages while the original screen remains open in the background. Once the subinteraction is done, the overlay is closed and a result value is communicated back to the parent layer.
Follows this link and opens the result in a new overlay.
Returns the current layer in the layer stack.
Listens to a DOM event that originated on an element contained by the current layer.
Opens an overlay and returns a promise for its acceptance.
Accepts the current layer when the link is clicked.
When this element is clicked, closes a currently open overlay.
Dismisses the current layer when the link is clicked.
Clicking this link will load the destination via AJAX and open the given selector in a modal drawer that slides in from the edge of the screen.
Accepts the current layer.
This event is emitted before a layer is accepted.
This event is emitted after a layer was accepted.
Creates an element with the given selector
and appends it to the current layer's
outmost element.
Opens an overlay and returns a promise for its acceptance.
Configures default attributes for new overlays.
Returns whether the given element
is contained by the current layer.
The context of the current layer.
Returns the number of layers in the layer stack.
Returns the current layer in the layer stack.
Dismisses the current layer.
This event is emitted before a layer is dismissed.
This event is emitted after a layer was dismissed.
Dismisses all overlays.
The outmost element of the current layer.
The outmost element of the current layer.
Emits an event on the current layer's element.
Returns the frontmost layer in the layer stack.
Returns an up.Layer
object for the given element or layer option.
Returns an array of up.Layer
objects matching the given layer option.
Whether fragment updates within the current layer can affect browser history and window title.
Returns whether the current layer is the frontmost layer.
Returns whether the current layer is not the root layer.
Returns whether the current layer is the root layer.
The location URL of the current layer.
This event is emitted after a layer's location property has changed value.
The current layer's mode which governs its appearance and behavior.
Follows this link and opens the result in a new overlay.
Unbinds an event listener previously bound to the current layer.
Listens to a DOM event that originated on an element contained by the current layer.
Opens a new overlay.
This event is emitted before an overlay is opened.
This event is emitted after a new overlay was placed into the DOM.
Returns an array of all overlays.
Returns the parent layer of the current layer.
Returns the root layer.
The size of the current layer.
A list of layers that are currently open.
Clicking this link will load the destination via AJAX and open the given selector in a modal overlay.
Closes a currently open overlay.
Sets default options for future modal overlays.
Returns whether the given element or selector is contained within the current layer.
Returns the location URL of the layer behind the current overlay.
Extracts the given CSS selector from the given HTML string and opens the results in a modal overlay.
Opens the given link's destination in a modal overlay.
Returns whether an overlay is currently open.
Returns the location URL of the fragment displayed in the current overlay.
Opens a modal overlay for the given URL.
Clicking this link will load the destination via AJAX and open the given selector in a popup overlay.
Attaches a popup overlay to the given element or selector.
Closes a currently open overlay.
Sets default options for future popup overlays.
Returns whether the given element or selector is contained within the current layer.
Returns the location URL of the layer behind the current overlay.
Returns whether an overlay is currently open.
Returns the location URL of the fragment displayed in the current overlay.