Published on

Build A Clone WhatsApp Android UI With Tailwind CSS Like A Pro With The Help Of These 6 Tips

Tags
Clone WhatsApp Android UI

As a FrontEnd technology blogger, it is essential to stay updated with the latest trends and technologies. One such technology that has gained immense popularity in recent times is Tailwind CSS. It is a utility-first CSS framework that provides a set of pre-defined classes that can be used to style HTML elements. In this article, we will learn how to build a Clone WhatsApp Android UI using Tailwind CSS.

What is Tailwind CSS?

Tailwind CSS is a utility-first CSS framework that provides a set of pre-defined classes that can be used to style HTML elements. It is designed to make it easier to create custom designs without having to write custom CSS. Tailwind CSS is highly customizable and can be configured to suit the needs of any project.

The description of Clone WhatsApp Android UI ui component

Clone WhatsApp Android UI is a user interface component that is designed to replicate the look and feel of the WhatsApp Android app. It includes various elements such as chat bubbles, input fields, buttons, and icons that are commonly used in messaging apps.

Why use Tailwind CSS to create a Clone WhatsApp Android UI ui component?

Tailwind CSS provides a set of pre-defined classes that can be used to style HTML elements. This makes it easier to create custom designs without having to write custom CSS. Tailwind CSS is highly customizable and can be configured to suit the needs of any project. It also provides responsive design utilities that can be used to create designs that are optimized for different screen sizes.

The preview of Clone WhatsApp Android UI ui component

To create a Clone WhatsApp Android UI using Tailwind CSS, we will use various elements such as chat bubbles, input fields, buttons, and icons. We will also use responsive design utilities to create a design that is optimized for different screen sizes.

Free download of the Clone WhatsApp Android UI's source code

The source code of Clone WhatsApp Android UI ui component

To create a Clone WhatsApp Android UI using Tailwind CSS, we will use various HTML and CSS classes provided by Tailwind CSS. The source code for the Clone WhatsApp Android UI can be found below.

<div class="flex flex-col min-h-screen max-w-sm mx-auto">
  <header class="flex flex-wrap pt-3 text-white mb-1" style="background-color:#128C7E">
    <div class="flex justify-between text-xl w-full font-medium pl-4">
      WhatsApp
      <div class="flex items-center">
        <svg
          class="h-4 mr-6 text-base"
          role="img"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 512 512"
        >
          <path
            fill="currentColor"
            d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"
          ></path></svg
        ><svg
          class="h-4 mr-4 text-base"
          style=""
          role="img"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 192 512"
        >
          <path
            fill="currentColor"
            d="M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"
          ></path>
        </svg>
      </div>
    </div>
    <div class="flex w-full items-center mt-4">
      <div class="pl-3 w-full">
        <svg
          class="h-4"
          role="img"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 512 512"
        >
          <path
            fill="currentColor"
            d="M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"
          ></path>
        </svg>
      </div>
      <button
        class="opacity-100 border-b-2 border-white tracking-wide text-sm uppercase font-medium text-center py-2 px-8 focus:outline-none"
      >
        chats
      </button>
      <button
        class="opacity-50 tracking-wide text-sm uppercase font-medium text-center py-2 px-8 focus:outline-none"
      >
        status
      </button>
      <button
        class="opacity-50 tracking-wide text-sm uppercase font-medium text-center py-2 px-8 focus:outline-none"
      >
        calls
      </button>
    </div>
  </header>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/hafeeskhan/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Marques
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/billyroshan/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Glenda
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/kudretkeskin/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Tyler
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/d33pthought/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Amalia
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/rweve/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Bruce
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/cherif_b/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Jovan
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/mekal/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Beverly
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/ky/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Providenci
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/vimarethomas/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Julia
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="px-3 pt-1 mt-1 flex">
    <img
      src="https://s3.amazonaws.com/uifaces/faces/twitter/belyaev_rs/128.jpg"
      class=" w-12 h-12 rounded-full"
      alt="dp"
    />
    <div class="flex flex-wrap ml-4 pb-4 w-full">
      <div class="inline-flex justify-between w-full font-bold">
        Ivy
        <span
          class="inline-flex items-center font-normal text-gray-400 text-xs"
        >
          yesterday
        </span>
      </div>
      <div class="inline-flex w-full text-sm text-gray-500">lorem ipsum</div>
    </div>
  </div>
  <div class="text-center text-xs text-gray-600 mt-4">Archived</div>
</div>

How to create a Clone WhatsApp Android UI with Tailwind CSS?

To create a Clone WhatsApp Android UI using Tailwind CSS, follow these steps:

Step 1: Set up the project

The first step is to set up the project. Create a new HTML file and include the Tailwind CSS stylesheet in the head section of the HTML file.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Clone WhatsApp Android UI</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" />
  </head>
  <body>
    <!-- Your HTML code goes here -->
  </body>
</html>

Step 2: Create the chat bubbles

The next step is to create the chat bubbles. We will use the bg-gray-100, rounded-lg, and p-3 classes to create the chat bubbles.

<div class="bg-gray-100 rounded-lg p-3">
  <p>Hello, how are you?</p>
</div>

Step 3: Create the input field

The next step is to create the input field. We will use the bg-gray-100, rounded-full, p-2, and w-full classes to create the input field.

<div class="bg-gray-100 rounded-full p-2 w-full">
  <input type="text" placeholder="Type a message" class="bg-transparent outline-none w-full" />
  <i class="fas fa-paperclip"></i>
  <i class="fas fa-microphone"></i>
</div>

Step 4: Create the send button

The next step is to create the send button. We will use the bg-green-500, text-white, rounded-full, p-2, and ml-2 classes to create the send button.

<button class="bg-green-500 text-white rounded-full p-2 ml-2">
  <i class="fas fa-paper-plane"></i>
</button>

Step 5: Create the header

The next step is to create the header. We will use the bg-green-500, text-white, flex, justify-between, items-center, p-4, and fixed classes to create the header.

<header class="bg-green-500 text-white flex justify-between items-center p-4 fixed w-full">
  <i class="fas fa-chevron-left"></i>
  <h1 class="font-bold">John Doe</h1>
  <i class="fas fa-ellipsis-v"></i>
</header>

Step 6: Create the chat screen

The final step is to create the chat screen. We will use the h-screen, pt-16, and pb-20 classes to create the chat screen.

<main class="h-screen pt-16 pb-20">
  <!-- Chat bubbles go here -->
  <!-- Input field and send button go here -->
</main>

Conclusion

In this article, we learned how to build a Clone WhatsApp Android UI using Tailwind CSS. We discussed the benefits of using Tailwind CSS and how it can make it easier to create custom designs. We also provided a step-by-step guide on how to create a Clone WhatsApp Android UI using Tailwind CSS. With these tips, you can create your own custom designs using Tailwind CSS like a pro.