Modal Controller

Controls the position and dismissal of modal dialogs. This component has no opinions about the actual appearance of the dialog, but is designed to work together with the fun-modal component.

For a fully ‘modal’ dialog, where the user is forced to use one of the buttons in the modal to dismiss it, set disableDefaultClose to true. You can also set closeButton to false on the fun-modal component, if you are using that.

See the Modal guidelines for usage of modals.

Examples

Specifications

Properties

Property Attribute Required Description
closeOnClickOutside close-on-click-outside Should the modal close when the user clicks outside it
closeOnEscape close-on-escape Should the modal close when the user presses 'Escape'
open open true Is the modal open
portal portal Deprecated no longer supported: If set, look for a dom element with this ID to render the modal inside. If not set or doesn't exist, render inline.
submitOnEnter submit-on-enter Should the modal be submitted when the user presses command+enter

Events

Name Description
funDismiss Emitted when the modal is dismissed.
funOpen Emitted after the modal is opened. A good place to put code to focus on something in the modal.
funSubmit Emitted when the modal is submitted using command+enter.

Search Gunnel

Powered byAlgolia