Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/Cute-category-posts/Cute-category-posts.php on line 342

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteBibleText/CuteBibleText.php on line 157

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteEventGallery/CuteEventGallery.php on line 141

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteEvents/CuteEvents.php on line 205

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteEvents3columns/CuteEvents3columns.php on line 172

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteEventsSidebar/CuteEventsSidebar.php on line 162

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteFaq/CuteFaq.php on line 158

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteGallery/cute-gallery.php on line 163

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteLastDonation/CuteLastDonation.php on line 147

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteLatest/CuteLatest.php on line 165

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteLatestSidebar/CuteLatestSidebar.php on line 162

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteLocation/CuteLocation.php on line 176

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CutePartners/CutePartners.php on line 142

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CutePastors/CutePastors.php on line 170

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CutePostGallery/CutePostGallery.php on line 153

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CutePostThumbnails/CutePostThumbnails.php on line 142

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteScripture/CuteScripture.php on line 144

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteSermons/CuteSermons.php on line 176

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteTestimonials/CuteTestimonials.php on line 164

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/CuteText/CuteText.php on line 153

Deprecated: Function create_function() is deprecated in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/plugins/cutechurch-slider/cutechurch-slider.php on line 267

Notice: Trying to access array offset on value of type int in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/uploads/warp/src/Warp/Config/Repository.php on line 243

Notice: Trying to access array offset on value of type int in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/uploads/warp/src/Warp/Config/Repository.php on line 243

Notice: Trying to access array offset on value of type int in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/uploads/warp/src/Warp/Config/Repository.php on line 243

Notice: Trying to access array offset on value of type int in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/uploads/warp/src/Warp/Config/Repository.php on line 243

Warning: session_start(): Cannot start session when headers already sent in /home/klient.dhosting.pl/nvservice/sites/nowaparafiam/public_html/wp-content/uploads/warp/systems/wordpress/src/Warp/Wordpress/Helper/SystemHelper.php on line 487
Modal » Church Modal – Church Modal – Church

Modal

Create modal dialogs with different styles and transitions.

Usage

The modal component consists of an overlay, a dialog and a close button.

Class Description
.uk-modal Add this class to a <div> element to create the dialog container and an overlay that blanks out the page. It is important to add an id to indicate the element for toggling.
.uk-modal-dialog Add this class to a child <div> element to create the dialog box.
.uk-modal-close Add this class to an <a> or <button> element to create a close button within the dialog box. We recommend adding the .uk-close class from the Close component to give the button a proper styling, though you can also use text or an image.

You can use any element to toggle a modal dialog. An <a> element needs to be linked to the modal’s id. To enable the necessary JavaScript, add the data-uk-modal attribute. If you are using another element, like a button, just add the data-uk-modal="{target:'#ID'}" attribute to target the modal’s id.

Example

Open

Markup

<!-- This is an anchor toggling the modal -->
<a href="#my-id" data-uk-modal>...</a>

<!-- This is a button toggling the modal -->
<button class="uk-button" data-uk-modal="{target:'#my-id'}">...</button>

<!-- This is the modal -->
<div id="my-id" class="uk-modal">
    <div class="uk-modal-dialog">
        <a class="uk-modal-close uk-close"></a>
        ...
    </div>
</div>

JavaScript options

By default, the modal closes automatically when clicking on the modal overlay. To prevent this from happening, just add the data-uk-modal="{target:'#ID',bgclose:false}" attribute.


You can create a header and footer for your modal, which are seperated from the content. Just add the .uk-modal-header or the .uk-modal-footer class to a <div> element inside the modal dialog.

Example

Headline

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Markup

<div class="uk-modal">
    <div class="uk-modal-dialog">
        <div class="uk-modal-header">...</div>
        ...
        <div class="uk-modal-footer">...</div>
    </div>
</div>

You can also create a caption that will be placed outside the modal. Just add the .uk-modal-caption class to a <div> element inside the modal dialog.

Example

Headline

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Caption

Markup

<div class="uk-modal">
    <div class="uk-modal-dialog">
        <div class="uk-modal-caption">...</div>
    </div>
</div>

To place a spinning icon inside your modal, add the .uk-modal-spinner class to a <div> element inside the modal dialog.

Example

Open

Markup

<div class="uk-modal">
    <div class="uk-modal-dialog">
        <div class="uk-modal-spinner">...</div>
    </div>
</div>

To create a lightbox-like modal dialog, just add the .uk-modal-dialog-lightbox class. This can be useful, if you want to use the modal as a lightbox for your images. The close button will adjust its position automatically to the dialog.

Example

Markup

<!-- This is the anchor toggling the modal -->
<a href="#my-id" data-uk-modal>...</a>

<!-- This is the modal -->
<div id="my-id" class="uk-modal">
    <div class="uk-modal-dialog uk-modal-dialog-lightbox">
        <a href="" class="uk-modal-close uk-close uk-close-alt"></a>
        <img src="" alt="">
    </div>
</div>

NOTE When creating a close button within the lightbox modifier, we also recommend adding the .uk-close-alt class from the Close component to the close button to give your button a styling that fits the lightbox modal.


Center Modal

To vertically center the modal, add the {center:true} option to the data-attribute.

Example

Open

Markup

<a href="#my-id" data-uk-modal="{center:true}"></a>

Large dialog modifier

To apply the site’s container width to the modal dialog, just add the .uk-modal-dialog-large class.

Example

Open

Markup

<div class="uk-modal-dialog uk-modal-dialog-large">...</div>

Overflow container in modal

You can also display the modal’s content in a scrollable container. Just add the .uk-overflow-container class to a <div> element inside the modal dialog. The modal will automatically expand and fill the site’s height.

Example

Open

Markup

<div class="uk-modal-dialog">
    <p>...</p>
    <div class="uk-overflow-container">...</div>
    <p>...</p>
</div>

JavaScript

You can handle modal dialogs via raw javascript.

Example

var modal = UIkit.modal(".modalSelector");

if ( modal.isActive() ) {
    modal.hide();
} else {
    modal.show();
}

Events

The modal component triggers an show.uk.modal event every time a modal is opened and hide.uk.modal when a modal is closed.

Example

$('.modalSelector').on({

    'show.uk.modal': function(){
        console.log("Modal is visible.");
    },

    'hide.uk.modal': function(){
        console.log("Element is not visible.");
    }
});

Events

Name Parameter Description
show.uk.modal event On modal show
hide.uk.modal event On modal hide