Contact form block for use with homepage of websites and landing pages.

Dependencies

  • Bootstrap 4
  • FontAwesome
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>FWR Bootstrap Blocks - Contact 2</title>

    <!-- Styles -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.9/css/all.css" integrity="sha384-5SOiIsAziJl6AWe0HWRKTXlfcSHKmYV4RBF18PPJ173Kzn7jzMyFuTtk8JA7QQG1" crossorigin="anonymous">

    <!-- Custom style -->
    <link rel="stylesheet" href="style.css">
    
</head>
<body>

    <div class="contact-2 py-4 pt-md-5 bg-light">

        <div class="container">

            <div class="contact-wrap text-center mx-md-auto px-2 pb-md-3">
                <strong class="contact-subtitle text-uppercase text-muted">Get Started</strong>
                <h1 class="contact-title mt-2">Get in Touch with Us</h1>

                <div class="contact-form mt-4 mt-md-5">
                    <div class="form-group">
                        <textarea name="message" id="message" cols="30" rows="5" placeholder="Send us your queries or feedback" class="form-control"></textarea>
                    </div>
                    <div class="form-group d-flex">
                        <div class="flex-fill">
                            <input type="text" class="form-control" placeholder="Your E-mail">
                        </div>
                        <button class="btn btn-primary ml-3 px-3">
                            <i class="fab fa-telegram-plane"></i>
                        </button>
                    </div>
                </div>
            </div>

            <div class="row text-center mt-4 mt-md-5 pt-4 address-wrap">
                <div class="col-md-4">
                    <address>
                        <div class="font-weight-bold mb-2">West Chicago, IL</div>
                        <span>
                            44 Shirley Ave.<br>
                            West Chicago, IL 60185
                        </span>
                    </address>
                </div>
                <div class="col-md-4 mt-3 mt-md-0">
                    <address>
                        <div class="font-weight-bold mb-2">Orlando, FL</div>
                        <span>
                            514 S. Magnolia St.<br>
                            Orlando, FL 32806
                        </span>
                    </address>
                </div>
                <div class="col-md-4 mt-3 mt-md-0">
                    <address>
                        <div class="font-weight-bold mb-2">Honolulu, HI</div>
                        <span>
                            4 Goldfield Rd.<br>
                            Honolulu, HI 96815
                        </span>
                    </address>
                </div>
            </div>

        </div>

    </div>
    <!-- /.contact-2 -->

    <!-- Scripts -->
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
// Bootstrap variables and mixins
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";

// Variables
$primary:             #5863f8;

// Custom CSS
.contact-title {
  font-size: 1.75rem;
}

.address-wrap {
  border-top: 2px solid $border-color;
}

address {
  span {
    font-size: .875rem;
  }
}

.btn-primary {
  @include button-variant($primary, $primary);
}

.text-muted {
  color: $gray-500 !important;
}

.form-control {
  border: 2px solid $gray-300;

  &:focus {
    border-color: rgba($primary, .5);
    box-shadow: 0 0 0 .2rem rgba($primary, .15);
  }
}


@include media-breakpoint-up(md) {

  .contact-wrap {
    max-width: 600px;
  }

  .contact-title {
    font-size: 2.25rem;
  }

}
.contact-title {
  font-size: 1.75rem;
}

.address-wrap {
  border-top: 2px solid #dee2e6;
}

address span {
  font-size: .875rem;
}

.btn-primary {
  color: #fff;
  background-color: #5863f8;
  border-color: #5863f8;
}

.btn-primary:hover {
  color: #fff;
  background-color: #3341f6;
  border-color: #2735f6;
}

.btn-primary:focus, .btn-primary.focus {
  -webkit-box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.5);
          box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.5);
}

.btn-primary.disabled, .btn-primary:disabled {
  color: #fff;
  background-color: #5863f8;
  border-color: #5863f8;
}

.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #2735f6;
  border-color: #1b2af5;
}

.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  -webkit-box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.5);
          box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.5);
}

.text-muted {
  color: #adb5bd !important;
}

.form-control {
  border: 2px solid #dee2e6;
}

.form-control:focus {
  border-color: rgba(88, 99, 248, 0.5);
  -webkit-box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.15);
          box-shadow: 0 0 0 0.2rem rgba(88, 99, 248, 0.15);
}

@media (min-width: 768px) {
  .contact-wrap {
    max-width: 600px;
  }
  .contact-title {
    font-size: 2.25rem;
  }
}
aHR0cHM6Ly9mcmVlLXdlYnNpdGUtcmVzb3VyY2VzLmNvbS9ibG9ja3MvYm9vdHN0cmFwL2Zvcm0vY29udGFjdC1mb3JtLTI=