# Documentation v8.0.38

Preview Downloads Purchase

# 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`:
Explore Purchase
Explore Purchase
Explore Purchase

    <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.

##### Modal Title

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 make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. 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,
Loading...

    <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-->

### Explore

### Metronic Licenses

License FAQs
Regular License
For single end product used by you or one client
$ 39
Extended License
For single SaaS app with paying users
$ 969
Custom License
Reach us for custom license offers.
Contact Us
Buy Now

### Metronic Demos

Demo 1
Demo 2
Demo 3
Demo 4
Demo 5
Demo 6
Demo 7
Demo 8
Demo 9
Demo 10
Demo 11
Demo 12
Demo 13
Demo 14
Demo 15
Demo 16
Demo 17
Demo 18
Demo 19
Demo 20
Demo 21
Demo 22
Coming soon
Coming soon

##### 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 & Videos
From guides and video tutorials, to live demos and code examples to get started.
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.
Metronic Downloads
Download your prefered framework and demo with one click.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now