Rate this docs

Textarea

Bootstrap textarea

Bootstrap textarea is an input dedicated for a large volume of text. It may be used in a variety of components like forms, comment sections and forums.

Textareas don't have to be boring. They can be enhanced with colors, shadows or rounded corners.

Examples of Bootstrap textarea use:

  • Comment section
  • Form
  • Forums

See the following Bootstrap textarea examples:


Defualt textarea



            <div class="form-group">
              <label for="exampleFormControlTextarea1">Large textarea</label>
              <textarea class="form-control rounded-0" id="exampleFormControlTextarea1" rows="10"></textarea>
            </div>

            <div class="form-group">
              <label for="exampleFormControlTextarea2">Small textarea</label>
              <textarea class="form-control rounded-0" id="exampleFormControlTextarea2" rows="3"></textarea>
            </div>

          

Material textarea



            <!--Material textarea-->
            <div class="md-form">
              <textarea type="text" id="form7" class="md-textarea form-control" rows="3"></textarea>
              <label for="form7">Material textarea</label>
            </div>
            <!--Textarea with icon prefix-->
            <div class="md-form">
              <i class="fa fa-pencil prefix"></i>
              <textarea type="text" id="form10" class="md-textarea form-control" rows="3"></textarea>
              <label for="form10">Icon Prefix</label>
            </div>
          

Textarea with colorful border

With our textarea you can use diffrent types of colors to customize your textarea.

Check our doucumentation about colors.

Defualt textarea



            <div class="form-group purple-border">
              <label for="exampleFormControlTextarea4">Colorful border</label>
              <textarea class="form-control" id="exampleFormControlTextarea4" rows="3"></textarea>
            </div>

            <div class="form-group green-border-focus">
              <label for="exampleFormControlTextarea5">Colorful border on :focus state</label>
              <textarea class="form-control" id="exampleFormControlTextarea5" rows="3"></textarea>
            </div>

          

            <div class="form-group purple-border">
              <label for="exampleFormControlTextarea4">Colorful border</label>
              <textarea class="form-control" id="exampleFormControlTextarea4" rows="3"></textarea>
            </div>

            <div class="form-group green-border-focus">
              <label for="exampleFormControlTextarea5">Colorful border on :focus state</label>
              <textarea class="form-control" id="exampleFormControlTextarea5" rows="3"></textarea>
            </div>
          

              .purple-border textarea {
                border: 1px solid #ba68c8;
            }
            .purple-border .form-control:focus {
                border: 1px solid #ba68c8;
                box-shadow: 0 0 0 0.2rem rgba(186, 104, 200, .25);
            }

            .green-border-focus .form-control:focus {
                border: 1px solid #8bc34a;
                box-shadow: 0 0 0 0.2rem rgba(139, 195, 74, .25);
            }
          

Material textarea



            <!--Material textarea-->
            <div class="md-form mb-4 pink-textarea active-pink-textarea">
              <textarea type="text" id="form18" class="md-textarea form-control" rows="3"></textarea>
              <label for="form18">Material textarea colorful on :focus state</label>
            </div>

            <!--Material textarea-->
            <div class="md-form amber-textarea active-amber-textarea">
              <textarea type="text" id="form19" class="md-textarea form-control" rows="3"></textarea>
              <label for="form19">Material textarea colorful on :focus state</label>
            </div>
            <!--Basic textarea-->
            <div class="md-form mb-4 pink-textarea active-pink-textarea-2">
              <textarea type="text" id="form17" class="md-textarea form-control" rows="3"></textarea>
              <label for="form17">Material textarea always colorful</label>
            </div>

            <!--Basic textarea-->
            <div class="md-form amber-textarea active-amber-textarea-2">
              <textarea type="text" id="form16" class="md-textarea form-control" rows="3"></textarea>
              <label for="form16">Material textarea always colorful</label>
            </div>

          

              .pink-textarea textarea.md-textarea:focus:not([readonly]) {
                border-bottom: 1px solid #f48fb1;
                box-shadow: 0 1px 0 0 #f48fb1;
            }
            .active-pink-textarea.md-form label.active {
                color: #f48fb1;
            }

            .amber-textarea textarea.md-textarea:focus:not([readonly]) {
                border-bottom: 1px solid #ffa000;
                box-shadow: 0 1px 0 0 #ffa000;
            }
            .active-amber-textarea.md-form label.active {
                color: #ffa000;
            }


            .active-pink-textarea-2 textarea.md-textarea {
                border-bottom: 1px solid #f48fb1;
                box-shadow: 0 1px 0 0 #f48fb1;
            }
            .active-pink-textarea-2.md-form label.active {
                color: #f48fb1;
            }
            .active-pink-textarea-2.md-form label {
                color: #f48fb1;
            }


            .active-amber-textarea-2 textarea.md-textarea {
                border-bottom: 1px solid #ffa000;
                box-shadow: 0 1px 0 0 #ffa000;
            }
            .active-amber-textarea-2.md-form label.active {
                color: #ffa000;
            }
            .active-amber-textarea-2.md-form label {
                color: #ffa000;
            }
          

Textarea with rounded corners



        <div class="form-group">
          <label for="exampleFormControlTextarea3">Rounded corners</label>
          <textarea class="form-control" id="exampleFormControlTextarea3" rows="7"></textarea>
        </div>

      

Textarea with shadow and placeholder



        <div class="form-group shadow-textarea">
          <label for="exampleFormControlTextarea6">Shadow and placeholder</label>
          <textarea class="form-control z-depth-1" id="exampleFormControlTextarea6" rows="3" placeholder="Write something here..."></textarea>
        </div>

      


          .shadow-textarea textarea.form-control::placeholder {
            font-weight: 300;
        }
        .shadow-textarea textarea.form-control {
            padding-left: 0.8rem;
        }
      

Material textarea with colorful prefix


        <!--Textarea with icon prefix-->
        <div class="md-form mb-4 pink-textarea active-pink-textarea">
          <i class="fa fa-angle-double-right prefix"></i>
          <textarea type="text" id="form21" class="md-textarea form-control" rows="3"></textarea>
          <label for="form21">Material textarea with colorful prefix on :focus state</label>
        </div>

        <!--Textarea with icon prefix-->
        <div class="md-form amber-textarea active-amber-textarea">
          <i class="fa fa-pencil prefix"></i>
          <textarea type="text" id="form22" class="md-textarea form-control" rows="3"></textarea>
          <label for="form22">Material textarea with colorful prefix on :focus state</label>
        </div>
        <!--Textarea with icon prefix-->
        <div class="md-form mb-4 pink-textarea active-pink-textarea-2">
          <i class="fa fa-angle-double-right prefix"></i>
          <textarea type="text" id="form23" class="md-textarea form-control" rows="3"></textarea>
          <label for="form23">Material textarea with prefix always colorful</label>
        </div>

        <!--Textarea with icon prefix-->
        <div class="md-form amber-textarea active-amber-textarea-2">
          <i class="fa fa-pencil prefix"></i>
          <textarea type="text" id="form24" class="md-textarea form-control" rows="3"></textarea>
          <label for="form24">Material textarea with prefix always colorful</label>
        </div>
      


          .active-pink-textarea.md-form label.active {
            color: #f48fb1;
        }
        .pink-textarea textarea.md-textarea:focus:not([readonly]) {
            border-bottom: 1px solid #f48fb1;
            box-shadow: 0 1px 0 0 #f48fb1;
        }
        .pink-textarea.md-form .prefix.active {
            color: #f48fb1;
        }

        .active-amber-textarea.md-form label.active {
            color: #ffa000;
        }
        .amber-textarea textarea.md-textarea:focus:not([readonly]) {
            border-bottom: 1px solid #ffa000;
            box-shadow: 0 1px 0 0 #ffa000;
        }
        .amber-textarea.md-form .prefix.active {
            color: #ffa000;
        }

        .active-pink-textarea-2 textarea.md-textarea {
            border-bottom: 1px solid #f48fb1;
            box-shadow: 0 1px 0 0 #f48fb1;
        }
        .active-pink-textarea-2.md-form label.active {
            color: #f48fb1;
        }
        .active-pink-textarea-2.md-form label {
            color: #f48fb1;
        }
        .active-pink-textarea-2.md-form .prefix {
            color: #f48fb1;
        }

        .active-amber-textarea-2 textarea.md-textarea {
            border-bottom: 1px solid #ffa000;
            box-shadow: 0 1px 0 0 #ffa000;
        }
        .active-amber-textarea-2.md-form label.active {
            color: #ffa000;
        }
        .active-amber-textarea-2.md-form label {
            color: #ffa000;
        }
        .active-amber-textarea-2.md-form .prefix {
            color: #ffa000;
        }
      

Textarea within forms MDB Pro component

Info notification

MDB has many forms to use together with textarea. Take a look here to know all the possibilities.

Contact Us

Contact Us



        <!-- Section: form gradient -->
        <section class="form-gradient mb-5">

          <!--Form with header-->
          <div class="card">

            <!--Header-->
            <div class="header peach-gradient">

              <div class="row d-flex justify-content-center">
                <h3 class="white-text mb-0 py-5 font-weight-bold">Contact Us</h3>
              </div>

            </div>
            <!--Header-->

            <div class="card-body mx-4">

              <div class="md-form">
                <i class="fa fa-user prefix grey-text"></i>
                <input type="text" id="form104" class="form-control">
                <label for="form104">Your name</label>
              </div>

              <div class="md-form">
                <i class="fa fa-envelope prefix grey-text"></i>
                <input type="text" id="form105" class="form-control">
                <label for="form105">Your email</label>
              </div>

              <div class="md-form">
                <i class="fa fa-tag prefix grey-text"></i>
                <input type="text" id="form106" class="form-control">
                <label for="form106">Subject</label>
              </div>

              <div class="md-form">
                <i class="fa fa-pencil prefix grey-text"></i>
                <textarea type="text" id="form107" class="md-textarea form-control" rows="5"></textarea>
                <label for="form107">Your message</label>
              </div>


              <!--Grid row-->
              <div class="row d-flex align-items-center mb-3 mt-4">

                <!--Grid column-->
                <div class="col-md-12">
                  <div class="text-center">
                    <button type="button" class="btn btn-grey btn-rounded z-depth-1a">Send</button>
                  </div>
                </div>
                <!--Grid column-->

              </div>
              <!--Grid row-->
            </div>

          </div>
          <!--/Form with header-->

        </section>
        <!-- Section: form gradient -->
        <!-- Section: form dark -->
        <section class="form-dark mb-5">

          <!--Form without header-->
          <div class="card card-image" style="background-image: url('https://mdbootstrap.com/img/Photos/Others/pricing-table%20(7).jpg');">
            <div class="text-white rgba-stylish-strong py-5 px-5 z-depth-4">

              <!--Header-->
              <div class="text-center">
                <h3 class="white-text mb-5 mt-4 font-weight-bold text-uppercase"><strong>Contact</strong> <a class="green-text font-weight-bold"><strong>
                      Us</strong></a></h3>
              </div>

              <div class="md-form">
                <input type="text" id="form100" class="form-control">
                <label for="form100">Your name</label>
              </div>

              <div class="md-form">
                <input type="text" id="form101" class="form-control">
                <label for="form101">Your email</label>
              </div>

              <div class="md-form">
                <input type="text" id="form102" class="form-control">
                <label for="form102">Subject</label>
              </div>

              <div class="md-form">
                <textarea type="text" id="form103" class="md-textarea form-control" rows="5"></textarea>
                <label for="form103">Your message</label>
              </div>

              <!--Grid row-->
              <div class="row d-flex align-items-center">

                <!--Grid column-->
                <div class="text-center col-md-12 mt-3 mb-2">
                  <button type="button" class="btn btn-success btn-block btn-rounded z-depth-1">Send</button>
                </div>
                <!--Grid column-->
              </div>
              <!--Grid row-->

            </div>
          </div>
          <!--/Form without header-->

        </section>
        <!-- Section: form dark -->

      

          .form-gradient .header {
            border-top-left-radius: .3rem;
            border-top-right-radius: .3rem; }

          .form-gradient input[type=text]:focus:not([readonly]) {
            border-bottom: 1px solid #fd9267;
            box-shadow: 0 1px 0 0 #fd9267; }

          .form-gradient input[type=text]:focus:not([readonly]) + label {
            color: #4f4f4f; }

          .form-gradient textarea.md-textarea:focus:not([readonly]) {
              border-bottom: 1px solid #fd9267;
              box-shadow: 0 1px 0 0 #fd9267; }


          .form-dark .md-form label {
            color: #fff; }

          .form-dark input[type=text]:focus:not([readonly]) {
            border-bottom: 1px solid #00C851;
            -webkit-box-shadow: 0 1px 0 0 #00C851;
            box-shadow: 0 1px 0 0 #00C851; }

          .form-dark input[type=text]:focus:not([readonly]) + label {
            color: #fff; }

          .form-dark textarea.md-textarea:focus:not([readonly]) {
              border-bottom: 1px solid #00C851;
              box-shadow: 0 1px 0 0 #00C851;
              color: #fff; }

          .form-dark textarea.md-textarea  {
              color: #fff;
          }

          .form-dark .form-control, .form-dark .form-control:focus {
              color: #fff;
          }
      

Textarea within comments list MDB Pro component

Avatar
Anna Smith
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Generic placeholder image
Danny Tatuum
Avatar
Caroline Horwitz
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis odit minima eaque dignissimos recusandae officiis commodi nulla est, tempore atque voluptas non quod maxime, iusto, debitis aliquid? Iure ipsum, itaque.


        <div class="media">
          <img class="d-flex rounded-circle avatar z-depth-1-half mr-3" src="https://mdbootstrap.com/img/Photos/Avatars/avatar-5.jpg"
            alt="Avatar">
          <div class="media-body">
            <h5 class="mt-0 font-weight-bold blue-text">Anna Smith</h5>
            Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus
            odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate
            fringilla. Donec lacinia congue felis in faucibus.

            <div class="media mt-3 shadow-textarea">
              <img class="d-flex rounded-circle avatar z-depth-1-half mr-3" src="https://mdbootstrap.com/img/Photos/Avatars/avatar-8.jpg"
                alt="Generic placeholder image">
              <div class="media-body">
                <h5 class="mt-0 font-weight-bold blue-text">Danny Tatuum</h5>
                <div class="form-group basic-textarea rounded-corners">
                  <textarea class="form-control z-depth-1" id="exampleFormControlTextarea3" rows="3" placeholder="Write your comment..."></textarea>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="media">
          <img class="d-flex rounded-circle avatar z-depth-1-half mr-3" src="https://mdbootstrap.com/img/Photos/Avatars/avatar-10.jpg"
            alt="Avatar">
          <div class="media-body">
            <h5 class="mt-0 font-weight-bold blue-text">Caroline Horwitz</h5>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis odit minima eaque dignissimos recusandae
            officiis commodi nulla est, tempore atque voluptas non quod maxime, iusto, debitis aliquid? Iure ipsum,
            itaque.
          </div>
        </div>

      


          .media .avatar {
            width: 64px;
        }
        .shadow-textarea textarea.form-control::placeholder {
            font-weight: 300;
        }
        .shadow-textarea textarea.form-control {
            padding-left: 0.8rem;
        }

      

Getting started : download & setup


Download

All the components and features are part of MDBootstrap package.

MDBootstrap (Material Design for Bootstrap) is a free (MIT Licensed) framework combining Material Design and the newest Bootstrap 4.

Click the button below to go to Download Page, where you can download MDBootstrap package.

MDBootstrap Download MDBootstrap About

MDB Pro

Using components and features labeled as MDB Pro component requires MDB Pro package.

Click the button below to learn more about MDBbootstrap Pro package

MDBootstrap Pro

Tutorials

If you need additional help to start, use our "5 min Quick Start" or "Full tutorial" resources.

5 min Quick Start Full Tutorial

Compilation

To reduce a weight of MDBootstrap package, you can compile your own, custom package containing only components and features you need.

Map of dependencies of SCSS files in MDBootstrap:


    Legend:

    '-->' means 'required'

    All free and pro files require files from 'core' catalog

    'none' means 'this component doesn't require anything except core files'

    A file wrapped by `< >` means that this file make the base component prettier but it isn't necessary for the proper working

    All PRO components require 'pro/_variables.scss' file

    scss/
    |
    |-- core/
    |   |
    |   |-- bootstrap/
    |   |	|-- _functions.scss
    |   |	|-- _variables.scss
    |   |
    |   |-- _colors.scss
    |   |-- _global.scss
    |   |-- _helpers.scss
    |   |-- _masks.scss
    |   |-- _mixins.scss
    |   |-- _typography.scss
    |   |-- _variables.scss
    |   |-- _waves.scss
    |
    |-- free/
    |   |-- _animations-basic.scss --> none
    |   |-- _animations-extended.scss --> _animations-basic.scss
    |   |-- _buttons.scss --> none
    |   |-- _cards.scss --> none <_buttons.scss>
    |   |-- _dropdowns.scss --> none <_buttons.scss>
    |   |-- _input-group.scss --> _forms.scss, _buttons.scss, _dropdowns.scss
    |   |-- _navbars.scss --> none <_buttons.scss, _forms.scss, _input-group.scss>
    |   |-- _pagination.scss --> none
    |   |-- _badges.scss --> none
    |   |-- _modals.scss --> _buttons.scss, _forms.scss (PRO --> _tabs.scss)
    |   |-- _carousels.scss --> <_buttons.scss>
    |   |-- _forms.scss --> none
    |   |-- _msc.scss --> none <_buttons.scss, _forms.scss, _cards.scss>
    |   |-- _footers.scss none <_buttons.scss> (PRO: )
    |   |-- _list-group.scss --> none
    |   |-- _tables.scss --> none (PRO: _material-select.scss, pro/_forms.scss, _checkbox.scss, pro/_buttons.scss, pro/_cards.scss, _pagination.scss, pro/_msc.scss)
    |   |-- _depreciated.scss
    |
    |-- pro/
    |   |
    |   |-- picker/
    |   |   |-- _default.scss --> none
    |   |   |-- _default-time.scss --> _default.scss, free/_forms.scss, free/_buttons.scss, pro/_buttons.scss, free/_cards.scss
    |   |   |-- _default-date.scss --> _default.scss, free/_forms.scss
    |   |
    |   |-- sections/
    |   |   |-- _templates.scss --> _sidenav.scss
    |   |   |-- _social.scss --> free/_cards.scss, free/ _forms.scss, free/_buttons.scss, pro/_buttons.scss,
    |   |   |-- _team.scss --> free/_buttons.scss, pro/_buttons.scss, free/_cards.scss, pro/_cards.scss
    |   |   |-- _testimonials.scss --> free/_carousels.scss, pro/_carousels.scss, free/_buttons.scss, pro/_buttons.scss
    |   |   |-- _magazine.scss --> _badges.scss
    |   |   |-- _pricing.scss --> free/_buttons.scss, pro/_buttons.scss
    |   |   |-- _contacts.scss --> free/_forms.scss, pro/_forms.scss, free/_buttons.scss, pro/_buttons.scss
    |   |
    |   |-- _variables.scss
    |   |-- _buttons.scss --> free/_buttons.scss, pro/_msc.scss, _checkbox.scss, _radio.scss
    |   |-- _social-buttons.scss --> free/_buttons.scss, pro/_buttons.scss
    |   |-- _tabs.scss --> _cards.scss
    |   |-- _cards.scss --> free/_cards.scss <_buttons.scss, _social-buttons.scss>
    |   |-- _dropdowns.scss --> free/_dropdowns.scss, free/_buttons.scss
    |   |-- _navbars.scss --> free/_navbars.scss  (PRO: )
    |   |-- _scrollspy.scss --> none
    |   |-- _lightbox.scss --> none
    |   |-- _chips.scss --> none
    |   |-- _msc.scss --> none
    |   |-- _forms.scss --> none
    |   |-- _radio.scss --> none
    |   |-- _checkbox.scss --> none
    |   |-- _material-select.scss --> none
    |   |-- _switch.scss --> none
    |   |-- _file-input.scss --> free/_forms.scss, free/_buttons.scss
    |   |-- _range.scss --> none
    |   |-- _input-group.scss --> free/_input-group.scss and the same what free input group, _checkbox.scss, _radio.scss
    |   |-- _autocomplete.scss --> free/_forms.scss
    |   |-- _accordion.scss --> pro/_animations.scss, free/_cards.scss
    |   |-- _parallax.scss --> none
    |   |-- _sidenav.scss --> free/_forms.scss, pro/_animations.scss, sections/_templates.scss
    |   |-- _ecommerce.scss --> free/_cards.scss, pro/_cards.scss, free/_buttons.scss, pro/_buttons.scss, pro/_msc.scss
    |   |-- _carousels.scss --> free/_carousels.scss, free/_cards.scss, free/_buttons.scss 
    |   |-- _steppers.scss --> free/_buttons.scss
    |   |-- _blog.scss --> none
    |   |-- _toasts.scss --> free/_buttons.scss
    |   |-- _animations.scss --> none
    |   |-- _charts.scss --> none
    |   |-- _progress.scss --> none
    |   |-- _scrollbar.scss --> none
    |   |-- _skins.scss --> none
    |   |-- _depreciated.scss
    |
    `-- _custom-skin.scss
    `-- _custom-styles.scss
    `-- _custom-variables.scss
    `-- mdb.scss

  

Map of dependencies of JavaScript modules in MDBootstrap:


    Legend:

    '-->' means 'required'

    All files require jQuery and bootstrap.js

    js/
    ├── dist/
    │   ├── buttons.js
    │   ├── cards.js
    │   ├── character-counter.js
    │   ├── chips.js
    │   ├── collapsible.js --> vendor/velocity.js
    │   ├── dropdown.js --> Popper.js, jquery.easing.js
    │   ├── file-input.js
    │   ├── forms-free.js
    │   ├── material-select.js --> dropdown.js
    │   ├── mdb-autocomplete.js
    │   ├── preloading.js
    │   ├── range-input.js --> vendor/velocity.js
    │   ├── scrolling-navbar.js
    │   ├── sidenav.js --> vendor/velocity.js, vendor/hammer.js, vendor/jquery.hammer.js
    │   └── smooth-scroll.js
    ├── _intro-mdb-pro.js
    ├── modules.js
    ├── src/
    │   ├── buttons.js
    │   ├── cards.js
    │   ├── character-counter.js
    │   ├── chips.js
    │   ├── collapsible.js --> vendor/velocity.js
    │   ├── dropdown.js --> Popper.js, jquery.easing.js
    │   ├── file-input.js
    │   ├── forms-free.js
    │   ├── material-select.js --> dropdown.js
    │   ├── mdb-autocomplete.js
    │   ├── preloading.js
    │   ├── range-input.js --> vendor/velocity.js
    │   ├── scrolling-navbar.js
    │   ├── sidenav.js --> vendor/velocity.js, vendor/hammer.js, vendor/jquery.hammer.js
    │   └── smooth-scroll.js
    └── vendor/
        ├── addons/
        │   ├── datatables.js
        │   └── datatables.min.js
        ├── chart.js
        ├── enhanced-modals.js
        ├── hammer.js
        ├── jarallax.js
        ├── jarallax-video.js --> vendor/jarallax.js
        ├── jquery.easing.js
        ├── jquery.easypiechart.js
        ├── jquery.hammer.js --> vendor/hammer.js
        ├── jquery.sticky.js
        ├── lightbox.js
        ├── picker-date.js --> vendor/picker.js
        ├── picker.js
        ├── picker-time.js --> vendor/picker.js
        ├── scrollbar.js
        ├── scrolling-navbar.js
        ├── toastr.js
        ├── velocity.js
        ├── waves.js
        └── wow.js
  

Compilation & Customization tutorial

If you need additional help to compile your custom package, use our Compilation & Customization tutorial

Compilation & Customization tutorial

Integrations with Angular, React or Vue

Apart from standard Bootstrap integration with jQuery, MDBootstrap provides integrations with Angular, React and Vue.

About MDB Angular About MDB React About MDB Vue