Published on

How To Build A Intercom's Inbox UI With Tailwind CSS With Tailwind CSS In 6 Easy Steps?

Tags
Intercom's Inbox UI with Tailwind CSS

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 Intercom's Inbox UI with Tailwind CSS ui component

Intercom's inbox ui with tailwind css

Why use Tailwind CSS to build a Intercom's Inbox UI with Tailwind CSS ui component?

  • It can make the building process of Intercom's Inbox UI with Tailwind CSS ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Intercom's Inbox UI with Tailwind CSS component file.

The preview of Intercom's Inbox UI with Tailwind CSS ui component

Free download of the Intercom's Inbox UI with Tailwind CSS's source code

The source code of Intercom's Inbox UI with Tailwind CSS ui component

<div class="flex flex-row h-screen bg-gray-100">
  <div class="flex flex-col justify-between items-center flex-none w-16 bg-gray-200">
    <div class="flex flex-col space-y-4 w-full items-center pt-5">
      <a><div class="rounded-full bg-gray-400 w-8 h-8"></div></a>
      <a class="block relative w-full h-16 w-16 flex justify-center items-center">
        <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg>
        <div class="absolute top-0 right-0 mr-3 mt-3 bg-red-500 w-4 h-4 text-xs text-white rounded-full text-center">5</div>
      </a>
      <a><div class="rounded-full bg-gray-400 w-8 h-8"></div></a>
    </div>
    <div class="flex flex-col space-y-4 pb-5">
      <a><div class="rounded-full bg-gray-400 w-8 h-8"></div></a>
      <a><div class="rounded-full bg-gray-400 w-8 h-8"></div></a>
    </div>

  </div>

  <div class="w-64 flex-none bg-gray-100 p-4 flex flex-col space-y-4">
    <div class="flex flex-row justify-between items-center mb-6">
      <h1 class="font-semibold text-2xl">Inbox</h1>
      <svg class="flex-none w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
    </div>

    <div class="bg-red-200 h-64"></div>
    <div class="bg-red-200 h-64"></div>
  </div>

  <div class="flex flex-row flex-auto bg-white rounded-tl-xl border-l shadow-xl">
    <div class="flex flex-col w-1/5">
      <div class="flex-none h-24 bg-red-200"> top</div>

      <div class="flex-auto overflow-y-auto">

        <a class="block border-b">
          <div class="border-l-2 border-transparent hover:bg-gray-100 p-3 space-y-4">
            <div class="flex flex-row items-center space-x-2">
              <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
              <strong class="flex-grow text-sm">Nikola Tesla</strong>
              <div class="text-sm text-gray-600">5hr</div>
            </div>

            <div class="flex flex-row items-center space-x-1">
              <svg class="flex-none w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
              <div class="flex-grow truncate text-xs">some message content whedkjwhed wkjehdkjweh dkjhwekjdhwekjhd </div>
            </div>
          </div>
        </a>

        <a class="block border-b">
          <div class="border-l-2 border-blue-500 bg-blue-100 p-3 space-y-4">
            <div class="flex flex-row items-center space-x-2">
              <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
              <strong class="flex-grow text-sm">Nikola Tesla</strong>
              <div class="text-sm text-gray-600">5hr</div>
            </div>

            <div class="flex flex-row items-center space-x-1">
              <svg class="flex-none w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
              <div class="flex-grow truncate text-xs">some message content whedkjwhed wkjehdkjweh dkjhwekjdhwekjhd </div>
            </div>
          </div>
        </a>

      </div>
    </div>

    <div class="w-3/5 border-l border-r border-gray-400 flex flex-col">
      <div class="flex-none h-20 flex flex-row justify-between items-center p-5 border-b">
        <div class="flex flex-col space-y-1">
          <strong>Nikola Tesla</strong>
          <input type="text" placeholder="Add coversation title" class="text-sm outline-none border-b border-dashed text-black placeholder-gray-600"/>
        </div>
        <div class="flex flex-row items-center">
          <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"></path></svg>
          <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"></path></svg>
          <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"></path></svg>
          <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"></path></svg>
        </div>
      </div>

      <div
        class="flex-auto overflow-y-auto p-5 space-y-4"
        style="background-image: url(https://static.intercomassets.com/ember/assets/images/messenger-backgrounds/background-1-99a36524645be823aabcd0e673cb47f8.png)"
      >
        <div class="flex flex-row space-x-2">
          <svg class="flex-none w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>

          <div class="flex flex-col">
            <div class="bg-gray-200 rounded p-5">
              Some message text
            </div>
            <div class="text-sm text-gray-600">4hr ago</div>
          </div>
        </div>

        <div class="flex flex-row justify-center text-sm text-gray-600">
          You assigned this conversation to yourself 5d ago
        </div>

        <div class="flex flex-row space-x-2 flex-row-reverse space-x-reverse">
          <svg class="flex-none w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>

          <div class="flex flex-col">
            <div class="bg-blue-100 rounded p-5">
              Some message text
            </div>
            <div class="text-sm text-gray-600">5hr ago</div>
          </div>
        </div>
      </div>

      <div class="flex-none h-40 p-4 pt-0">
        <textarea class="w-full h-full outline-none border focus:border-blue-600 hover:border-blue-600 rounded p-4 shadow-lg">Hi</textarea>
      </div>
    </div>

    <div class="w-1/5 bg-gray-200 overflow-y-auto flex flex-col">
      <div class="h-64 flex-none border-b border-gray-400 flex flex-col">
        hi
      </div>

      <div class="flex flex-col space-y-4 p-4">
        <div class="flex flex-none h-64 bg-white border rounded p-4 justify-center items-center">
          card content
        </div>
        <div class="flex flex-none h-64 bg-white border rounded p-4 justify-center items-center">
          card content
        </div>
        <div class="flex flex-none h-64 bg-white border rounded p-4 justify-center items-center">
          card content
        </div>
      </div>
    </div>
  </div>
</div>

How to build a Intercom's Inbox UI with Tailwind CSS with Tailwind CSS?

Install tailwind css of verion 2.0.3

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

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

All the unility class needed to build a Intercom's Inbox UI with Tailwind CSS component

  • flex
  • flex-row
  • h-screen
  • bg-gray-100
  • flex-col
  • flex-none
  • w-16
  • bg-gray-200
  • w-full
  • pt-5
  • bg-gray-400
  • w-8
  • h-8
  • block
  • relative
  • h-16
  • absolute
  • top-0
  • right-0
  • mr-3
  • mt-3
  • bg-red-500
  • w-4
  • h-4
  • text-xs
  • text-white
  • text-center
  • pb-5
  • w-64
  • p-4
  • mb-6
  • text-2xl
  • bg-red-200
  • h-64
  • flex-auto
  • bg-white
  • border-l
  • w-1/5
  • h-24
  • overflow-y-auto
  • border-b
  • border-l-2
  • border-transparent
  • hover:bg-gray-100
  • p-3
  • w-5
  • h-5
  • flex-grow
  • text-sm
  • text-gray-600
  • w-3
  • h-3
  • border-blue-500
  • bg-blue-100
  • w-3/5
  • border-r
  • border-gray-400
  • h-20
  • p-5
  • border-dashed
  • text-black
  • w-6
  • h-6
  • flex-row-reverse
  • h-40
  • pt-0
  • h-full
  • focus:border-blue-600
  • hover:border-blue-600

69 steps to build a Intercom's Inbox UI with Tailwind CSS component with Tailwind CSS

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

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

  3. Use h-screen to make an element span the entire height of the viewport.

  4. Control the background color of an element to gray-100 using the bg-gray-100 utilities.

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

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

  7. Use w-16 to set an element to a fixed width(4rem).

  8. Control the background color of an element to gray-200 using the bg-gray-200 utilities.

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

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

  11. Control the background color of an element to gray-400 using the bg-gray-400 utilities.

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

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

  14. Use inline utilities to put the element on its own line and fill its parent.

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

  16. Use h-16 to set an element to a fixed height(4rem).

  17. Use absolute to position an element outside of the normal flow of the document, causing neighboring elements to act as if the element doesn’t exist.

  18. Use the top-0 utilities to set the top position of a positioned element to 0rem.

  19. Use the right-0 utilities to set the right position of a positioned element to 0rem.

  20. Control the margin on right side of an element to 0.75rem using the mr-3 utilities.

  21. Control the margin on top side of an element to 0.75rem using the mt-3 utilities.

  22. Control the background color of an element to red-500 using the bg-red-500 utilities.

  23. Use w-4 to set an element to a fixed width(1rem).

  24. Use h-4 to set an element to a fixed height(1rem).

  25. Control the text color of an element to xs using the text-xs utilities.

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

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

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

  29. Use w-64 to set an element to a fixed width(16rem).

  30. Control the padding on all sides of an element to 1rem using the p-4 utilities.

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

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

  33. Control the background color of an element to red-200 using the bg-red-200 utilities.

  34. Use h-64 to set an element to a fixed height(16rem).

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

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

  37. Control the border color of an element to l using the border-l utilities.

  38. Use w-1/5 to set an element to a fixed width(1/5).

  39. Use h-24 to set an element to a fixed height(6rem).

  40. Use overflow-y-auto to allow vertical scrolling if needed.

  41. Control the border color of an element to b using the border-b utilities.

  42. Control the border color of an element to l-2 using the border-l-2 utilities.

  43. Control the border color of an element to transparent using the border-transparent utilities.

  44. Control the background color of an element to gray-100 using the hover:bg-gray-100 utilities on hover.

  45. Control the padding on all sides of an element to 0.75rem using the p-3 utilities.

  46. Use w-5 to set an element to a fixed width(1.25rem).

  47. Use h-5 to set an element to a fixed height(1.25rem).

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

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

  50. Control the text color of an element to gray-600 using the text-gray-600 utilities.

  51. Use w-3 to set an element to a fixed width(0.75rem).

  52. Use h-3 to set an element to a fixed height(0.75rem).

  53. Control the border color of an element to blue-500 using the border-blue-500 utilities.

  54. Control the background color of an element to blue-100 using the bg-blue-100 utilities.

  55. Use w-3/5 to set an element to a fixed width(3/5).

  56. Control the border color of an element to r using the border-r utilities.

  57. Control the border color of an element to gray-400 using the border-gray-400 utilities.

  58. Use h-20 to set an element to a fixed height(5rem).

  59. Control the padding on all sides of an element to 1.25rem using the p-5 utilities.

  60. Control the border color of an element to dashed using the border-dashed utilities.

  61. Control the text color of an element to black using the text-black utilities.

  62. Use w-6 to set an element to a fixed width(1.5rem).

  63. Use h-6 to set an element to a fixed height(1.5rem).

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

  65. Use h-40 to set an element to a fixed height(10rem).

  66. Control the padding on top side of an element to 0rem using the pt-0 utilities.

  67. Use h-full to set an element’s height to 100% of its parent, as long as the parent has a defined height.

  68. Control the border color of an element to blue-600 using the focus:border-blue-600 utilities on focus.

  69. Control the border color of an element to blue-600 using the hover:border-blue-600 utilities on hover.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to build a Intercom's Inbox UI with Tailwind CSS components, learn and follow along to implement your own components.