Documentation v8.0.36

Preview Downloads Purchase

Overview

Metronic customizes the Bootstrap Floating Labels  through the SASS variables in src/sass/components/_variables.scss.

Basic Examples

Basic examples of using floating labels:
<!--begin::Input group-->
<div class="form-floating mb-7">
    <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"/>
    <label for="floatingInput">Email address</label>
</div>
<!--end::Input group-->

<!--begin::Input group-->
<div class="form-floating mb-7">
    <input type="password" class="form-control" id="floatingPassword" placeholder="Password"/>
    <label for="floatingPassword">Password</label>
</div>
<!--end::Input group-->

<!--begin::Input group-->
<div class="form-floating">
    <input type="email" class="form-control" id="floatingInputValue" placeholder="name@example.com" value="test@example.com"/>
    <label for="floatingInputValue">Input with value</label>
</div>
<!--end::Input group-->

Validation States

Form validation states work as expected:
<!--begin::Input group-->
<div class="form-floating mb-7">
    <input type="email" class="form-control is-valid" id="floatingInput2" placeholder="name@example.com" value="test@example.com"/>
    <label for="floatingInput">Valid input</label>
</div>
<!--end::Input group-->

<!--begin::Input group-->
<div class="form-floating">
    <input type="password" class="form-control is-invalid" id="floatingPassword2" placeholder="name@example.com" value="test@example.com"/>
    <label for="floatingPassword">Invalid input</label>
</div>
<!--end::Input group-->

Textareas

Textares with default and custom height options:
<!--begin::Input group-->
<div class="form-floating mb-7">
    <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea"></textarea>
    <label for="floatingTextarea">Comments</label>
</div>
<!--end::Input group-->

<!--begin::Input group-->
<div class="form-floating">
    <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
    <label for="floatingTextarea2">Comments</label>
</div>
<!--end::Input group-->

Selects

Floating Labels are available on form select elements as well:
<!--begin::Input group-->
<div class="form-floating">
    <select class="form-select" id="floatingSelect" aria-label="Floating label select example">
        <option selected>Open this select menu</option>
        <option value="1">One</option>
        <option value="2">Two</option>
        <option value="3">Three</option>
    </select>
    <label for="floatingSelect">Works with selects</label>
</div>
<!--end::Input group-->

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
$ 939
Custom License
Reach us for custom license offers.
Buy Now
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