Bootstrap snippet and html example. custom search form

Bootstrap 3.4.1 snippet "custom search form" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: form

HTML code

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

<div class="container">
    <div itemscope="" itemtype="http://schema.org/WebSite">
        <meta itemprop="url" content="https://www.bootdey.com/bootstrap-snippets" />
        <form action="/bootstrap-snippets" itemprop="potentialAction" itemtype="http://schema.org/SearchAction" accept-charset="utf-8" id="SearchHomeForm" method="get">
            <input name="utf8" type="hidden" value="✓" />
            <div class="form-group form-search">
                <meta itemprop="target" content="https://www.bootdey.com/bootstrap-snippets?q=" /> <input type="text" value="" name="q" id="q" class="form-control form-control-search" placeholder="Search" itemprop="query-input" />
                <button type="submit" class="btn btn-default btn-round btn-submit"><i class="glyphicon glyphicon-search icon-2x"></i></button>
            </div>
        </form>
    </div>

</div>

CSS code

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

body{margin-top:20px;
background:#eee;
}
.form-search {
    max-width: 510px;
    padding: 0 15px;
    margin: 30px auto 0;
    position: relative;
}

.form-search .form-control-search {
    background-color: rgba(121,121,121,.55);
    border: none;
    border-radius: 30px;
    box-shadow: 0 0 0;
    color: #FFF;
    display: block;
    font-size: 20px;
    font-weight: 300;
    height: 50px;
    line-height: 1.42857;
    padding: 6px 20px;
    vertical-align: middle;
    transition: background-color .2s;
}
.form-search .btn-submit {
    position: absolute;
    right: 18px;
    border: none;
    padding: 10px 12px;
    height: 44px;
    line-height: 30px;
    width: 44px;
    display: block;
    top: 3px;
    opacity: .7;
    background: #FFF;
    color: #666;
    transition: all .2s;
}
.icon-2x {
    font-size: 1.8em;
}
.btn-round {
    border-width: 1px;
    border-radius: 30px!important;
    opacity: .79;
    padding: 9px 18px;
}

Similar snippets

Bootstrap example and template. Dark Login

Dark Login

Bootstrap example and template. Register form with particles js

Register form with particles js

Bootstrap example and template. small change password form

small change password form

Bootstrap example and template. account setting or edit profile

account setting or edit profile

Bootstrap example and template. User list page

User list page

Bootstrap example and template. portfolio with category filter and masonry

portfolio with category filter and masonry

Bootstrap example and template. bs4 past orders profile

bs4 past orders profile

Bootstrap example and template. Products View List

Products View List

FAQ

How do I use this snippet?

Include Bootstrap 3.4.1, 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 3.4.1.

Bootstrap example and template. custom search form

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 901+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 3.4.1

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.4.1 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

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