Published on

How To Make A Section Avatars With Tailwind CSS In 5 Easy Steps

Tags
Section Avatars

What is Tailwind CSS?

Tailwind CSS is a utility-first CSS framework that focuses on creating personalized user interfaces quickly. It can gives you all the building blocks you are able to create personalized designs without having to fight to override irritating opinionated styles. Also, Tailwind CSS is a highly configurable, low-level CSS framework.

The description of Section Avatars ui component

Section avatars

Why use Tailwind CSS to create a Section Avatars ui component?

  • It can make the building process of Section Avatars ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Section Avatars component file.

The preview of Section Avatars ui component

Free download of the Section Avatars's source code

The source code of Section Avatars ui component

<link rel="stylesheet" href="https://demos.creative-tim.com/notus-js/assets/styles/tailwind.css">
<link rel="stylesheet" href="https://demos.creative-tim.com/notus-js/assets/vendor/@fortawesome/fontawesome-free/css/all.min.css">

<section class="pt-20 pb-20">
<div class="flex flex-wrap justify-center text-center mb-24">
            <div class="w-full lg:w-6/12 px-4">
              <h2 class="text-4xl font-semibold  text-blueGray-700">Here are our heroes</h2>
              <p class="text-lg leading-relaxed m-4 text-blueGray-500">
                According to the National Oceanic and Atmospheric
                Administration, Ted, Scambos, NSIDClead scentist, puts the
                potentially record maximum.
              </p>
            </div>
          </div>
  <div class="flex flex-wrap">
    <div class="w-full md:w-6/12 lg:w-3/12 lg:mb-0 mb-12 px-8">
      <div class="px-6">
        <img alt="..." src="https://demos.creative-tim.com/notus-js/assets/img/team-1-800x800.jpg" class="shadow-lg rounded-full mx-auto max-w-120-px">
        <div class="pt-6 text-center">
          <h5 class="text-xl font-bold text-blueGray-700">Ryan Tompson</h5>
          <p class="mt-1 text-sm text-blueGray-400 uppercase font-semibold"> Web Developer</p>
          <div class="mt-6">
            <button class="bg-lightBlue-400 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-twitter"></i></button><button class="bg-lightBlue-600 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-facebook-f"></i></button><button class="bg-pink-500 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-dribbble"></i>
            </button>
          </div>
        </div>
      </div>
    </div>

    <div class="w-full md:w-6/12 lg:w-3/12 lg:mb-0 mb-12 px-8">
      <div class="px-6">
        <img alt="..." src="https://demos.creative-tim.com/notus-js/assets/img/team-2-800x800.jpg" class="shadow-lg rounded-full mx-auto max-w-120-px">
        <div class="pt-6 text-center">
          <h5 class="text-xl font-bold text-blueGray-700">Romina Hadid</h5>
          <p class="mt-1 text-sm text-blueGray-400 uppercase font-semibold">
            Marketing Specialist
          </p>
          <div class="mt-6">
            <button class="bg-red-600 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-google"></i></button><button class="bg-lightBlue-600 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-facebook-f"></i>
            </button>
          </div>
        </div>
      </div>
    </div>

    <div class="w-full md:w-6/12 lg:w-3/12 lg:mb-0 mb-12 px-8">
      <div class="px-6">
        <img alt="..." src="https://demos.creative-tim.com/notus-js/assets/img/team-3-800x800.jpg" class="shadow-lg rounded-full mx-auto max-w-120-px">
        <div class="pt-6 text-center">
          <h5 class="text-xl font-bold text-blueGray-700">Alexa Smith</h5>
          <p class="mt-1 text-sm text-blueGray-400 uppercase font-semibold">UI/UX Designer </p>
          <div class="mt-6">
            <button class="bg-red-600 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-google"></i></button><button class="bg-lightBlue-400 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-twitter"></i></button><button class="bg-blueGray-700 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-instagram"></i>
            </button>
          </div>
        </div>
      </div>
    </div>


    <div class="w-full md:w-6/12 lg:w-3/12 lg:mb-0 mb-12 px-8">
      <div class="px-6">
        <img alt="..." src="https://demos.creative-tim.com/notus-js/assets/img/team-4-470x470.png" class="shadow-lg rounded-full mx-auto max-w-120-px">
        <div class="pt-6 text-center">
          <h5 class="text-xl font-bold text-blueGray-700">Jenna Kardi</h5>
          <p class="mt-1 text-sm text-blueGray-400 uppercase font-semibold">Founder and CEO</p>
          <div class="mt-6">
            <button class="bg-pink-500 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-dribbble"></i></button><button class="bg-red-600 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-google"></i></button><button class="bg-lightBlue-400 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-twitter"></i></button><button class="bg-blueGray-700 text-white w-8 h-8 rounded-full outline-none focus:outline-none mr-1 mb-1" type="button">
              <i class="fab fa-instagram"></i>
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
  <footer class="relative pt-8 pb-6 mt-1">
  <div class="container mx-auto px-4">
    <div class="flex flex-wrap items-center md:justify-between justify-center">
      <div class="w-full md:w-6/12 px-4 mx-auto text-center">
        <div class="text-sm text-blueGray-500 font-semibold py-1">
          Made with <a href="https://www.creative-tim.com/product/notus-js" class="text-blueGray-500 hover:text-gray-800" target="_blank">Notus JS</a> by <a href="https://www.creative-tim.com" class="text-blueGray-500 hover:text-blueGray-800" target="_blank"> Creative Tim</a>.
        </div>
      </div>
    </div>
  </div>
</footer>

How to create a Section Avatars with Tailwind CSS?

Install tailwind css of verion 2.2.4

Use the script html tag to import the script of Tailwind CSS of the version 2.2.4

<script src="https://cdn.tailwindcss.com"></script>

All the unility class needed to create a Section Avatars component

  • pt-20
  • pb-20
  • flex
  • flex-wrap
  • text-center
  • mb-24
  • w-full
  • lg:w-6/12
  • px-4
  • text-4xl
  • text-blueGray-700
  • text-lg
  • m-4
  • text-blueGray-500
  • md:w-6/12
  • lg:w-3/12
  • lg:mb-0
  • mb-12
  • px-8
  • px-6
  • mx-auto
  • max-w-120-px
  • pt-6
  • text-xl
  • mt-1
  • text-sm
  • text-blueGray-400
  • mt-6
  • bg-lightBlue-400
  • text-white
  • w-8
  • h-8
  • mr-1
  • mb-1
  • bg-lightBlue-600
  • bg-pink-500
  • bg-red-600
  • bg-blueGray-700
  • relative
  • pt-8
  • pb-6
  • py-1
  • hover:text-gray-800
  • hover:text-blueGray-800

44 steps to create a Section Avatars component with Tailwind CSS

  1. Control the padding on top side of an element to 5rem using the pt-20 utilities.

  2. Control the padding on bottom side of an element to 5rem using the pb-20 utilities.

  3. Use flex to create a block-level flex container.

  4. Use flex to create a block-level flex container.

  5. Control the text color of an element to center using the text-center utilities.

  6. Control the margin on bottom side of an element to 6rem using the mb-24 utilities.

  7. Use w-full to set an element to a 100% based width.

  8. Use lg:w-6/12 to set an element to a fixed width(6/12) at only large screen sizes.

  9. Control the horizontal padding of an element to 1rem using the px-4 utilities.

  10. Control the text color of an element to 4xl using the text-4xl utilities.

  11. Control the text color of an element to blueGray-700 using the text-blueGray-700 utilities.

  12. Control the text color of an element to lg using the text-lg utilities.

  13. Control the margin on all sides of an element to 1rem using the m-4 utilities.

  14. Control the text color of an element to blueGray-500 using the text-blueGray-500 utilities.

  15. Use md:w-6/12 to set an element to a fixed width(6/12) at only medium screen sizes.

  16. Use lg:w-3/12 to set an element to a fixed width(3/12) at only large screen sizes.

  17. Control the margin on bottom side of an element to 0rem at only large screen sizes using the lg:mb-0 utilities.

  18. Control the margin on bottom side of an element to 3rem using the mb-12 utilities.

  19. Control the horizontal padding of an element to 2rem using the px-8 utilities.

  20. Control the horizontal padding of an element to 1.5rem using the px-6 utilities.

  21. Control the horizontal margin of an element to auto using the mx-auto utilities.

  22. Set the maximum width/height of an element using the max-w-120-px utilities.

  23. Control the padding on top side of an element to 1.5rem using the pt-6 utilities.

  24. Control the text color of an element to xl using the text-xl utilities.

  25. Control the margin on top side of an element to 0.25rem using the mt-1 utilities.

  26. Control the text color of an element to sm using the text-sm utilities.

  27. Control the text color of an element to blueGray-400 using the text-blueGray-400 utilities.

  28. Control the margin on top side of an element to 1.5rem using the mt-6 utilities.

  29. Control the background color of an element to lightBlue-400 using the bg-lightBlue-400 utilities.

  30. Control the text color of an element to white using the text-white utilities.

  31. Use w-8 to set an element to a fixed width(2rem).

  32. Use h-8 to set an element to a fixed height(2rem).

  33. Control the margin on right side of an element to 0.25rem using the mr-1 utilities.

  34. Control the margin on bottom side of an element to 0.25rem using the mb-1 utilities.

  35. Control the background color of an element to lightBlue-600 using the bg-lightBlue-600 utilities.

  36. Control the background color of an element to pink-500 using the bg-pink-500 utilities.

  37. Control the background color of an element to red-600 using the bg-red-600 utilities.

  38. Control the background color of an element to blueGray-700 using the bg-blueGray-700 utilities.

  39. Use relative to position an element according to the normal flow of the document.

  40. Control the padding on top side of an element to 2rem using the pt-8 utilities.

  41. Control the padding on bottom side of an element to 1.5rem using the pb-6 utilities.

  42. Control the vertical padding of an element to 0.25rem using the py-1 utilities.

  43. Control the text color of an element to gray-800 on hover using the hover:text-gray-800 utilities.

  44. Control the text color of an element to blueGray-800 on hover using the hover:text-blueGray-800 utilities.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to create a Section Avatars components, learn and follow along to implement your own components.