Bootstrap snippet and html example. Bootstrap User Profile with Random User

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 4.3.1 included, to get the result that you can see in the preview selection


<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<div id="user" class="container profile" style="display: none;">
  <div class="row">
    <div class="col text-center mt-3">
      <img alt="picture" v-bind:src="user.picture" class="img-lg rounded-circle border shadow" />
      <h2 class="mt-3">{{ user.name }}</h2>
    </div>
  </div>

  <div class="row mt-2">
    <div class="col">
      <ul class="nav nav-tabs" id="myTab" role="tablist">
        <li class="nav-item">
          <a class="nav-link active" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="true">Profile</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" id="address-tab" data-toggle="tab" href="#address" role="tab" aria-controls="address" aria-selected="false">Address</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" id="links-tab" data-toggle="tab" href="#links" role="tab" aria-controls="links" aria-selected="false">Links</a>
        </li>
      </ul>
      <div class="tab-content" id="myTabContent">
        <div class="tab-pane fade show active" id="profile" role="tabpanel" aria-labelledby="profile-tab">
          <table class="table table-hover table-sm table-properties">
            <tr v-show="user.sub">
              <th>sub</th>
              <td style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 20rem;">{{user.sub}}</td>
            </tr>
            <tr v-show="user.password">
              <th>password</th>
              <td>{{user.password}}</td>
            </tr>
            <tr v-show="user.uid">
              <th>uid</th>
              <td>{{user.uid}}</td>
            </tr>
            <tr v-show="user.nickname">
              <th>nickname</th>
              <td>{{user.nickname}}</td>
            </tr>
            <tr v-show="user.preferred_username">
              <th>preferred username</th>
              <td>{{user.preferred_username}}</td>
            </tr>
            <tr v-show="user.gender">
              <th>gender</th>
              <td>{{user.gender}}</td>
            </tr>
            <tr v-show="user.birthdate">
              <th>birthdate</th>
              <td>{{user.birthdate}}</td>
            </tr>
            <tr v-show="user.locale">
              <th>locale</th>
              <td>{{user.locale}}</td>
            </tr>
            <tr v-show="user.zoneinfo">
              <th>zoneinfo</th>
              <td>{{user.zoneinfo}}</td>
            </tr>
            <tr v-show="user.given_name">
              <th>given name</th>
              <td>{{user.given_name}}</td>
            </tr>
            <tr v-show="user.middle_name">
              <th>middle name</th>
              <td>{{user.middle_name}}</td>
            </tr>
            <tr v-show="user.family_name">
              <th>family name</th>
              <td>{{user.family_name}}</td>
            </tr>
          </table>
        </div>

        <div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
          <table class="table table-hover table-sm table-properties">
            <tr v-show="user.email">
              <th>email</th>
              <td>{{user.email}}</td>
            </tr>
            <tr v-show="user.email_verified">
              <th>email verified</th>
              <td>{{user.email_verified}}</td>
            </tr>
            <tr v-show="user.phone_number">
              <th>phone number</th>
              <td>{{user.phone_number}}</td>
            </tr>
            <tr v-show="user.phone_number_verified">
              <th>phone number verified</th>
              <td>{{user.phone_number_verified}}</td>
            </tr>
          </table>
        </div>

        <div class="tab-pane fade" id="address" role="tabpanel" aria-labelledby="address-tab">
          <table class="table table-hover table-sm table-properties">
            <tr v-show="user.address.country">
              <th>country</th>
              <td>{{user.address.country}}</td>
            </tr>
            <tr v-show="user.address.postal_code">
              <th>postal code</th>
              <td>{{user.address.postal_code}}</td>
            </tr>
            <tr v-show="user.address.locality">
              <th>locality</th>
              <td>{{user.address.locality}}</td>
            </tr>
            <tr v-show="user.address.region">
              <th>region</th>
              <td>{{user.address.region}}</td>
            </tr>
            <tr v-show="user.address.street_address">
              <th>street address</th>
              <td>{{user.address.street_address}}</td>
            </tr>
            <tr v-show="user.address.formatted">
              <th>formatted</th>
              <td>{{user.address.formatted}}</td>
            </tr>
          </table>
        </div>

        <div class="tab-pane fade" id="links" role="tabpanel" aria-labelledby="links-tab">
          <table class="table table-hover table-sm table-properties">
            <tr v-show="user['@id']">
              <th>@id</th>
              <td><a v-bind:href="user['@id']">{{user["@id"]}}</a></td>
            </tr>
            <tr v-show="user.me">
              <th>me</th>
              <td><a v-bind:href="user.me">{{user.me}}</a></td>
            </tr>
            <tr v-show="user.website">
              <th>website</th>
              <td><a v-bind:href="user.website">{{user.website}}</a></td>
            </tr>
            <tr v-show="user.profile">
              <th>profile</th>
              <td><a v-bind:href="user.profile">{{user.profile}}</a></td>
            </tr>
            <tr v-show="user.webmail">
              <th>webmail</th>
              <td><a v-bind:href="user.webmail">{{user.webmail}}</a></td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 4.3.1 included, to get the result that you can see in the preview selection


.profile .table-properties th {
  font-weight: normal;
  width: 15rem;
}

.profile .table-properties td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile .table-properties tr:first-child td,
.profile .table-properties tr:first-child th {
  border-top: none !important;
}

.profile .img-lg {
  width: 9rem;
  height: 9rem;
}

Javascript/Jquery code

This is the javascript code used to create this bootstrap snippet, You can copy and paste the following javascript code inside a page with bootstrap 4.3.1 included, to get the result that you can see in the preview selection


$.ajax({
  url: "https://phantauth.net/user/",
  dataType: "json",
  success: function(user) {
    new Vue({ el: "#user", data: { user: user } });
    $("#user").show();
  }
});
 

Similar snippets

Bootstrap example and template. User profile account setting

User profile account setting

Bootstrap example and template. shop cart

shop cart

Bootstrap example and template. Simple Comment panel

Simple Comment panel

Bootstrap example and template. social media resumen profile

social media resumen profile

Bootstrap example and template. Color chat

Color chat

Bootstrap example and template. Social navigation box

Social navigation box

Bootstrap example and template. direct chat box

direct chat box

Bootstrap example and template. Contact page section

Contact page section

Bootstrap example and template. Bootstrap User Profile with Random User

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 498 views, Using this bootstrap snippet you have the following benefits:

Bootstrap 4.3.1

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

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

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

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