Bootstrap snippet and html example. portfolio with filter menu

Bootstrap 4.5.0 snippet "portfolio with filter menu" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: portfolio,filter,isotope

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n

HTML code

Clean, semantic HTML that powers this Bootstrap 4.5.0 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js" integrity="sha512-Zq2BOxyhvnRFXu0+WE6ojpZLOU2jdnqbrM1hmVdGzyeCa1DgM3X5Q4A/Is9xA1IkbUeDd7755dNNI/PzSf2Pew==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<section class="section">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="text-center">
                    <ul class="col container-filter portfolioFilte list-unstyled mb-0" id="filter">
                        <li><a class="categories active" data-filter="*">All</a></li>
                        <li><a class="categories" data-filter=".branding">Branding</a></li>
                        <li><a class="categories" data-filter=".design">Design</a></li>
                        <li><a class="categories" data-filter=".photo">Photo</a></li>
                        <li><a class="categories" data-filter=".coffee">coffee</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="port portfolio-masonry mt-4">
            <div class="portfolioContainer row photo">
                <div class="col-lg-4 p-4 " style="position: absolute; left: 0px; top: 0px;">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x540/FF7F50/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x540/FF7F50/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Branding</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Nonsensical content</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding coffee">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x960/6495ED/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x960/6495ED/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Coffee</p>
                                    <h6 class="text-dark mt-1 text-uppercase">PageMaker including</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding photo">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x800/008B8B/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x800/008B8B/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Lebles</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Sometime Active</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding design photo">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x540/9932CC/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x540/9932CC/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Card</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Therefore Always</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 design photo">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x540/FF8C00/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x540/FF8C00/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Pepers</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Therefore Always</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding design coffee">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x1120/87CEFA/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x1120/87CEFA/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Bottle</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Therefore Always</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding design">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x800/FF69B4/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x800/FF69B4/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Watch</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Sometime Active</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>

                <div class="col-lg-4 p-4 branding design photo coffee">
                    <div class="item-box">
                        <a class="mfp-image" href="https://www.bootdey.com/image/800x580/20B2AA/000000" title="Project Name">
                            <img class="item-container img-fluid" src="https://www.bootdey.com/image/800x580/20B2AA/000000" alt="work-img">
                            <div class="item-mask">
                                <div class="item-caption">
                                    <p class="text-dark mb-0">Milk</p>
                                    <h6 class="text-dark mt-1 text-uppercase">Sometime Active</h6>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 4.5.0 to keep the design, spacing, and responsiveness consistent.

body{margin-top:20px;}
.container-filter {
  margin-top: 0;
  margin-right: 0;
  margin-left: 0;
  margin-bottom: 30px;
  padding: 0;
  text-align: center;
}

.container-filter li {
  list-style: none;
  display: inline-block;
}

.container-filter a {
  display: block;
  font-size: 14px;
  margin: 10px 20px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 400;
  line-height: 30px;
  -webkit-transition: all 0.6s;
  border-bottom: 1px solid transparent;
  color: #807c7c !important;
}

.container-filter a:hover {
  color: #222222 !important;
}

.container-filter a.active {
  color: #222222 !important;
  border-bottom: 1px solid #222222;
}

.item-box {
  position: relative;
  overflow: hidden;
  display: block;
}

.item-box a {
  display: inline-block;
}

.item-box .item-mask {
  background: none repeat scroll 0 0 rgba(255, 255, 255, 0.9);
  position: absolute;
  transition: all 0.5s ease-in-out 0s;
  -moz-transition: all 0.5s ease-in-out 0s;
  -webkit-transition: all 0.5s ease-in-out 0s;
  -o-transition: all 0.5s ease-in-out 0s;
  top: 10px;
  left: 10px;
  bottom: 10px;
  right: 10px;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  text-align: center;
}

.item-box .item-mask .item-caption {
  position: absolute;
  width: 100%;
  bottom: 10px;
  opacity: 0;
}

.item-box:hover .item-mask {
  opacity: 1;
  visibility: visible;
  cursor: pointer !important;
}

.item-box:hover .item-caption {
  opacity: 1;
}

.item-box:hover .item-container {
  width: 100%;
}

.services-box {
  padding: 45px 25px 45px 25px;
}

Javascript/Jquery code

Lightweight JS to power any interactions this snippet needs. Drop it under your scripts (after Bootstrap 4.5.0) to mirror the live demo.

$(window).on('load', function() {
    var $container = $('.portfolioContainer');
    var $filter = $('#filter');
    $container.isotope({
        filter: '*',
        layoutMode: 'masonry',
        animationOptions: {
            duration: 750,
            easing: 'linear'
        }
    });
    $filter.find('a').click(function() {
        var selector = $(this).attr('data-filter');
        $filter.find('a').removeClass('active');
        $(this).addClass('active');
        $container.isotope({
            filter: selector,
            animationOptions: {
                animationDuration: 750,
                easing: 'linear',
                queue: false,
            }
        });
        return false;
    });
});
 

Similar snippets

Bootstrap example and template. portfolio with category filter using isotope js

portfolio with category filter using isotope js

Bootstrap example and template. portfolio with category filter and masonry

portfolio with category filter and masonry

Bootstrap example and template. shopping and portfolio profile

shopping and portfolio profile

Bootstrap example and template. Awesome portfolio

Awesome portfolio

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. blog item comments

blog item comments

Bootstrap example and template. Confirm registration email

Confirm registration email

Bootstrap example and template. Contact List

Contact List

FAQ

How do I use this snippet?

Include Bootstrap 4.5.0, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 4.5.0.

Bootstrap example and template. portfolio with filter menu

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 8.2K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 4.5.0

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 4.5.0 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working