Documentation v1.0.6

Preview Upgrade to Pro

Overview

Overlay is a custom component to create an overlay effect on elements.

Basic

Use .overlay on an element and wrap the element's primary content with .overlay-wrapper and the overlay content with .overlay-layer and set the overlay backgroud color with opacity with .bg-white .bg-opacity-5:
<div class="row">
    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card  overlay overflow-hidden">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-1.jpg" alt="" class="w-100 rounded"/>
                </div>
                <div class="overlay-layer bg-dark bg-opacity-25">
                    <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                    <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>

    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card  overlay overflow-hidden">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-2.jpg" alt="" class="w-100 rounded"/>
                </div>
                <div class="overlay-layer bg-dark bg-opacity-25 align-items-end justify-content-center">
                    <div class="d-flex flex-grow-1 flex-center  py-5">
                        <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                        <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                    </div>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>

    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card  overlay overflow-hidden">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-3.jpg" alt="" class="w-100 rounded"/>
                </div>
                <div class="overlay-layer bg-dark bg-opacity-25 align-items-start justify-content-center">
                    <div class="d-flex flex-grow-1 flex-center py-5">
                        <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                        <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                    </div>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>
</div>

Default Shown

Use .overlay-block on an element to display its overlay content by default:
<div class="row">
    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card overlay overlay-block">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-1.jpg" alt="" class="w-100 card-rounded"/>
                </div>
                <div class="overlay-layer card-rounded bg-dark bg-opacity-25">
                    <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                    <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>

    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card  overlay overflow-hidden">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-2.jpg" alt="" class="w-100 card-rounded"/>
                </div>
                <div class="overlay-layer card-rounded bg-dark bg-opacity-25 align-items-end justify-content-center">
                    <div class="d-flex flex-grow-1 flex-center  py-5">
                        <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                        <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                    </div>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>

    <div class="col-lg-4">
        <!--begin::Card-->
        <div class="card  overlay overflow-hidden">
            <div class="card-body p-0">
                <div class="overlay-wrapper">
                    <img src="assets/media/stock/600x400/img-3.jpg" alt="" class="w-100 card-rounded"/>
                </div>
                <div class="overlay-layer card-rounded bg-dark bg-opacity-25 align-items-start justify-content-center">
                    <div class="d-flex flex-grow-1 flex-center py-5">
                        <a href="#" class="btn btn-primary btn-shadow">Explore</a>
                        <a href="#" class="btn btn-light-primary btn-shadow ms-2">Purchase</a>
                    </div>
                </div>
            </div>
        </div>
        <!--end::Card-->
    </div>
</div>

Content Blocking

Use .overlay-block class for blocking an element content.

Content Blocking

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to.
Loading...
<div class="card shadow">
    <div class="card-header">
        <h3 class="card-title">Content Blocking</h3>
    </div>
    <div class="card-body">
        <div class="overlay overlay-block card-rounded">
            <div class="overlay-wrapper p-5">
                Lorem Ipsum is simply dummy text...
            </div>
            <div class="overlay-layer card-rounded bg-dark bg-opacity-5">
                <div class="spinner-border text-primary" role="status">
                    <span class="visually-hidden">Loading...</span>
                </div>
            </div>
        </div>
    </div>
</div>

Card Blocking

Use .overlay-block class for blocking card element.

Card Blocking

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to.
Loading...
<div class="card card-border overlay overlay-block">
    <div class="card-header">
        <h3 class="card-title">Card Blocking</h3>
    </div>
    <div class="card-body">
        <div class="overlay-wrapper p-5">
            Lorem Ipsum is simply dummy text....
        </div>
        <div class="overlay-layer card-rounded bg-dark bg-opacity-5">
            <div class="spinner-border text-primary" role="status">
                <span class="visually-hidden">Loading...</span>
            </div>
        </div>
    </div>
</div>

Modal Blocking

Use .overlay-block class block a modal's content.
<button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#exampleModal">Launch modal</button>

<!--begin::Modal Body Overlay-->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Modal Title</h5>

                <!--begin::Close-->
                <div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
                    <span class="svg-icon svg-icon-2x"></span>
                </div>
                <!--end::Close-->
            </div>

            <!--begin::Overlay-->
            <div class="modal-body overlay overlay-block">
                Lorem Ipsum is simply dummy text ...

                <!--begin::Overlay Layer-->
                <div class="overlay-layer bg-dark bg-opacity-5">
                    <div class="spinner-border text-primary" role="status">
                        <span class="visually-hidden">Loading...</span>
                    </div>
                </div>
                <!--end::Overlay Layer-->
            </div>
            <!--end::Overlay-->

            <div class="modal-footer">
                <button type="button" class="btn btn-light-primary fw-bold" data-bs-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary ">Ok</button>
            </div>
        </div>
    </div>
</div>
<!--end::Modal Body Overlay-->
Upgrade To Pro
Pro Version Benefits Free Pro
UI Elements 20 100
In-house Components 20 40
Crafted Pages 5 20
Complete Documentation
Product Support
Layout Builder
Source Vectors
Email Templates
Calendar App
User Management App
Chat App
Customers App
Upgrade to Jet HTML Free
Learn & Get Inspired

Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
Documentation
From guides and how-tos, to live demos and code examples to get started right away.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now