fun-modal

A modal is a dialog that takes over the screen, positioning itself over the rest of the content. While the modal is open the rest of the page cannot be interacted with.

This component is for the actual dialog. It is designed to work together with the fun-modal-controller component.

Note that the modal is 100% width by default, so you should probably apply a max width. The tailwind max-w-xl , max-w-2xl classes are suitable for this.

If your modal will contain other floating content such as popovers or tooltips you should add class relative to your body content, so that positioning works properly in Firefox and safari.

See the Modals page for more details of using modals with further examples.

Examples

Specifications

Properties

PropertyAttributeRequiredDescriptionTypeDefault
closeButtonclose-buttonfalseShould the modal have a close buttonbooleantrue

Events

NameDescription
funModalCloseOccurs when the close button is clicked.

Slots

NameDescription
bodyFor the modal body.
footerFor the modal footer, usually only contains action buttons.
headerFor the modal header / title.

Dependencies

Depends on

This documentation page generated from the source at fun-modal.tsx

Search Gunnel

Powered byAlgolia