Angular Bootstrap Contact section

Angular contact sections - Bootstrap & Material Design

Note: This documentation is for an older version of Bootstrap (v.4). A newer version is available for Bootstrap 5. We recommend migrating to the latest version of our product - Material Design for Bootstrap 5.
Go to docs v.5

Contact section provides you a necessary information for your users to get in touch with you.


Required styles import

Starting with MDB Angular 8, using the following components requires importing an additional stylesheet. Add the following imports to the global styles.scss stylesheet file.

        
            
          @import "~ng-uikit-pro-standard/assets/scss/core/colors";
          @import "~ng-uikit-pro-standard/assets/scss/core/variables";
          @import "~ng-uikit-pro-standard/assets/scss/core/variables-pro";
          @import "~ng-uikit-pro-standard/assets/scss/sections-pro/_contacts-pro.scss";
        
        
    

Contact v.1 MDB Pro component

Contact us

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam eum porro a pariatur veniam.

Write to us:

We'll write rarely, but only the best content.


New York, 94126

United States

+ 01 234 567 89

Mon - Fri, 8:00-22:00

info@gmail.com

sale@gmail.com

        
            
            <!--Section: Contact v.1-->
            <section class="pb-5">
  
              <!--Section heading-->
              <h2 class="h1 pt-4">Contact us</h2>
              <!--Section description-->
              <p class="pb-4">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure
                provident
                voluptate esse quasi,
                veritatis totam voluptas nostrum quisquam eum porro a pariatur accusamus veniam.</p>
  
              <div class="row">
  
                <!--Grid column-->
                <div class="col-lg-5 my-4">
  
                  <!--Form with header-->
                  <mdb-card>
  
                    <mdb-card-body>
                      <!--Header-->
                      <div class="form-header blue accent-1">
                        <h3>
                          <mdb-icon fas icon="envelope"></mdb-icon> Write to us:</h3>
                      </div>
  
                      <p>We'll write rarely, but only the best content.</p>
                      <br>
  
                      <!--Body-->
                      <div class="md-form">
                        <mdb-icon fas icon="user" class="prefix grey-text"></mdb-icon>
                        <input mdbInput type="text" id="form3" class="form-control">
                        <label for="form3">Your name</label>
                      </div>
  
                      <div class="md-form">
                        <mdb-icon fas icon="envelope" class="prefix grey-text"></mdb-icon>
                        <input mdbInput type="text" id="form2" class="form-control">
                        <label for="form2">Your email</label>
                      </div>
  
                      <div class="md-form">
                        <mdb-icon fas icon="tag" class="prefix grey-text"></mdb-icon>
                        <input mdbInput type="text" id="form32" class="form-control">
                        <label for="form34">Subject</label>
                      </div>
  
                      <div class="md-form">
                        <mdb-icon fas icon="pencil-alt" class="prefix grey-text"></mdb-icon>
                        <textarea mdbInput type="text" id="form8" class="md-textarea"></textarea>
                        <label for="form8">Icon Prefix</label>
                      </div>
  
                      <div class="text-center">
                        <button mdbBtn color="light-blue" class="waves-light" mdbWavesEffect>Submit</button>
                      </div>
  
                    </mdb-card-body>
  
                  </mdb-card>
                  <!--Form with header-->
  
                </div>
                <!--Grid column-->
  
                <!--Grid column-->
                <div class="col-lg-7">
  
                  <!--Google map-->
                  <agm-map class="z-depth-1-half map-container" style="height: 400px;" [latitude]="map.lat" [longitude]="map.lng">
                    <agm-marker [latitude]="map.lat" [longitude]="map.lng"></agm-marker>
                  </agm-map>
  
                  <br>
                  <!--Buttons-->
                  <div class="row text-center">
                    <div class="col-md-4">
                      <a mdbBtn floating="true" color="blue" class="accent-1 waves-light" mdbWavesEffect>
                        <mdb-icon fas icon="map-marked"></mdb-icon>
                      </a>
                      <p>San Francisco, CA 94126</p>
                      <p>United States</p>
                    </div>
  
                    <div class="col-md-4">
                      <a mdbBtn floating="true" color="blue" class="accent-1 waves-light" mdbWavesEffect>
                        <mdb-icon fas icon="phone"></mdb-icon>
                      </a>
                      <p>+ 01 234 567 89</p>
                      <p>Mon - Fri, 8:00-22:00</p>
                    </div>
  
                    <div class="col-md-4">
                      <a mdbBtn floating="true" color="blue" class="accent-1 waves-light" mdbWavesEffect>
                        <mdb-icon fas icon="envelope"></mdb-icon>
                      </a>
                      <p>info@gmail.com</p>
                      <p>sale@gmail.com</p>
                    </div>
                  </div>
  
                </div>
                <!--Grid column-->
  
              </div>
  
            </section>
            <!--Section: Contact v.1-->
          
        
    
        
            
            import { Component } from '@angular/core';
  
            @Component({
              selector: 'contact-component',
              templateUrl: './contact.component.html',
              styleUrls: ['./contact.component.scss'],
            })
            export class ContactComponent {
              map = {
                lat: 51.678418,
                lng: 7.809007,
              };
            }
          
        
    

Contact v.2 MDB Pro component

Contact us

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam eum porro a pariatur veniam.

  • San Francisco, CA 94126, USA

  • + 01 234 567 89

  • contact@example.com

        
            
            <!-- Section: Contact v.2 -->
            <section class="my-5">
  
              <!-- Section heading -->
              <h2 class="h1-responsive font-weight-bold text-center my-5">Contact us</h2>
              <!-- Section description -->
              <p class="text-center w-responsive mx-auto mb-5">Lorem ipsum dolor sit amet, consectetur adipisicing elit.
                Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam
                eum porro a pariatur veniam.</p>
  
              <!-- Grid row -->
              <div class="row">
  
                <!-- Grid column -->
                <div class="col-md-9 mb-md-0 mb-5">
  
                  <form>
  
                    <!-- Grid row -->
                    <div class="row">
  
                      <!-- Grid column -->
                      <div class="col-md-6">
                        <div class="md-form mb-0">
                          <input type="text" id="contact-name" class="form-control" mdbInput>
                          <label for="contact-name" class="">Your name</label>
                        </div>
                      </div>
                      <!-- Grid column -->
  
                      <!-- Grid column -->
                      <div class="col-md-6">
                        <div class="md-form mb-0">
                          <input type="text" id="contact-email" class="form-control" mdbInput>
                          <label for="contact-email" class="">Your email</label>
                        </div>
                      </div>
                      <!-- Grid column -->
  
                    </div>
                    <!-- Grid row -->
  
                    <!-- Grid row -->
                    <div class="row">
  
                      <!-- Grid column -->
                      <div class="col-md-12">
                        <div class="md-form mb-0">
                          <input type="text" id="contact-Subject" class="form-control" mdbInput>
                          <label for="contact-Subject" class="">Subject</label>
                        </div>
                      </div>
                      <!-- Grid column -->
  
                    </div>
                    <!-- Grid row -->
  
                    <!-- Grid row -->
                    <div class="row">
  
                      <!-- Grid column -->
                      <div class="col-md-12">
                        <div class="md-form">
                          <textarea type="text" id="contact-message" class="form-control md-textarea" rows="3"
                            mdbInput></textarea>
                          <label for="contact-message">Your message</label>
                        </div>
                      </div>
                      <!-- Grid column -->
  
                    </div>
                    <!-- Grid row -->
  
                  </form>
  
                  <div class="text-center text-md-left">
                    <a mdbBtn color="primary" mdbWavesEffect>Send</a>
                  </div>
  
                </div>
                <!-- Grid column -->
  
                <!-- Grid column -->
                <div class="col-md-3 text-center">
                  <ul class="list-unstyled mb-0">
                    <li>
                      <mdb-icon fas icon="map-marked" size="2x" class="blue-text"></mdb-icon>
                      <p>San Francisco, CA 94126, USA</p>
                    </li>
                    <li>
                      <mdb-icon fas icon="phone" size="2x" class="mt-4 blue-text"></mdb-icon>
                      <p>+ 01 234 567 89</p>
                    </li>
                    <li>
                      <mdb-icon fas icon="envelope" size="2x" class="mt-4 blue-text"></mdb-icon>
                      <p class="mb-0">contact@example.com</p>
                    </li>
                  </ul>
                </div>
                <!-- Grid column -->
  
              </div>
              <!-- Grid row -->
  
            </section>
            <!-- Section: Contact v.2 -->
          
        
    

Contact v.3 MDB Pro component

Write to us:

Contact information

  • New York, 94126, USA

  • + 01 234 567 89

  • contact@example.com


        
            
            <!-- Section: Contact v.3 -->
            <section class="contact-section my-5">
  
              <!-- Form with header -->
              <div class="card">
  
                <!-- Grid row -->
                <div class="row">
  
                  <!-- Grid column -->
                  <div class="col-lg-8">
  
                    <div class="card-body form">
  
                      <!-- Header -->
                      <h3 class="mt-4"><mdb-icon fas icon="envelope" class="pr-2"></mdb-icon>Write to us:</h3>
  
                      <!-- Grid row -->
                      <div class="row">
  
                        <!-- Grid column -->
                        <div class="col-md-6">
                          <div class="md-form mb-0">
                            <input type="text" id="form-contact-name" class="form-control" mdbInput>
                            <label for="form-contact-name" class="">Your name</label>
                          </div>
                        </div>
                        <!-- Grid column -->
  
                        <!-- Grid column -->
                        <div class="col-md-6">
                          <div class="md-form mb-0">
                            <input type="text" id="form-contact-email" class="form-control" mdbInput>
                            <label for="form-contact-email" class="">Your email</label>
                          </div>
                        </div>
                        <!-- Grid column -->
  
                      </div>
                      <!-- Grid row -->
  
                      <!-- Grid row -->
                      <div class="row">
  
                        <!-- Grid column -->
                        <div class="col-md-6">
                          <div class="md-form mb-0">
                            <input type="text" id="form-contact-phone" class="form-control" mdbInput>
                            <label for="form-contact-phone" class="">Your phone</label>
                          </div>
                        </div>
                        <!-- Grid column -->
  
                        <!-- Grid column -->
                        <div class="col-md-6">
                          <div class="md-form mb-0">
                            <input type="text" id="form-contact-company" class="form-control" mdbInput>
                            <label for="form-contact-company" class="">Your company</label>
                          </div>
                        </div>
                        <!-- Grid column -->
  
                      </div>
                      <!-- Grid row -->
  
                      <!-- Grid row -->
                      <div class="row">
  
                        <!-- Grid column -->
                        <div class="col-md-12">
                          <div class="md-form mb-0">
                            <textarea type="text" id="form-contact-message" class="form-control md-textarea" rows="3"
                              mdbInput></textarea>
                            <label for="form-contact-message">Your message</label>
                            <a mdbBtn floating="true" size="lg" color="blue" mdbWavesEffect>
                              <mdb-icon far icon="paper-plane"></mdb-icon>
                            </a>
                          </div>
                        </div>
                        <!-- Grid column -->
  
                      </div>
                      <!-- Grid row -->
  
                    </div>
  
                  </div>
                  <!-- Grid column -->
  
                  <!-- Grid column -->
                  <div class="col-lg-4">
  
                    <div class="card-body contact text-center h-100 white-text">
  
                      <h3 class="my-4 pb-2">Contact information</h3>
                      <ul class="text-lg-left list-unstyled ml-4">
                        <li>
                          <p><mdb-icon fas icon="map-marked" class="pr-2"></mdb-icon>New York, 94126, USA</p>
                        </li>
                        <li>
                          <p><mdb-icon fas icon="phone" class="pr-2"></mdb-icon>+ 01 234 567 89</p>
                        </li>
                        <li>
                          <p><mdb-icon fas icon="envelope" class="pr-2"></mdb-icon>contact@example.com</p>
                        </li>
                      </ul>
                      <hr class="hr-light my-4">
                      <ul class="list-inline text-center list-unstyled">
                        <li class="list-inline-item">
                          <a class="p-2 fa-lg tw-ic">
                            <mdb-icon fab icon="twitter"></mdb-icon>
                          </a>
                        </li>
                        <li class="list-inline-item">
                          <a class="p-2 fa-lg li-ic">
                            <mdb-icon fab icon="linkedin-in"> </mdb-icon>
                          </a>
                        </li>
                        <li class="list-inline-item">
                          <a class="p-2 fa-lg ins-ic">
                            <mdb-icon fab icon="instagram"> </mdb-icon>
                          </a>
                        </li>
                      </ul>
  
                    </div>
  
                  </div>
                  <!-- Grid column -->
  
                </div>
                <!-- Grid row -->
  
              </div>
              <!-- Form with header -->
  
            </section>
            <!-- Section: Contact v.3 -->
          
        
    

Angular Contact - API

In this section you will find informations about required modules and available inputs, outputs, methods and events of Angular contact sections.


Modules used

In order to speed up your application, you can choose to import only the modules you actually need, instead of importing the entire MDB Angular library. Remember that importing the entire library, and immediately afterwards a specific module, is bad practice, and can cause application errors.

        
            
          import { CardsFreeModule, InputsModule, WavesModule, ButtonsModule } from 'ng-uikit-pro-standard'