Published on

6 Incredibly Easy Ways To Make A Simple Invoice with External Links With Tailwind CSS Better While Spending Less

Tags
Simple Invoice with External Links

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.

Invoice with simple table and external links.

  • It can make the building process of Simple Invoice with External Links ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Simple Invoice with External Links component file.

Free download of the Simple Invoice with External Links's source code

<section class="bg-gray-100 py-20">
  <div class="max-w-2xl mx-auto py-0 md:py-16">
    <article class="shadow-none md:shadow-md md:rounded-md overflow-hidden">
      <div class="md:rounded-b-md  bg-white">
        <div class="p-9 border-b border-gray-200">
          <div class="space-y-6">
            <div class="flex justify-between items-top">
              <div class="space-y-4">
                <div>
                  <img class="h-6 object-cover mb-4" src="https://cdn.mjwebs.com/sites/mjwebs/mjwebs-logo.png">
                  <p class="font-bold text-lg"> Invoice </p>
                  <p> MJWebs </p>
                </div>
                <div>
                  <p class="font-medium text-sm text-gray-400"> Billed To </p>
                  <p> Tony Stark </p>
                  <p> [email protected] </p>
                  <p> (02) 1234 1234 </p>
                </div>
              </div>
              <div class="space-y-2">
                <div>
                  <p class="font-medium text-sm text-gray-400"> Invoice Number </p>
                  <p> INV-MJ0001 </p>
                </div>
                <div>
                  <p class="font-medium text-sm text-gray-400"> Invoice Date </p>
                  <p> 31 December 2021 </p>
                </div>
                <div>
                  <p class="font-medium text-sm text-gray-400"> ABN </p>
                  <p> 57 630 182 446 </p>
                </div>
                <div>
                  <a href="#" target="_blank" class="inline-flex items-center text-sm font-medium text-blue-500 hover:opacity-75 "> Download PDF <svg class="ml-0.5 h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                      <path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path>
                      <path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"></path>
                    </svg>
                  </a>
                </div>
                <div>
                  <a href="#" target="_blank" class="inline-flex items-center text-sm font-medium text-blue-500 hover:opacity-75 "> Pay Balance <svg class="ml-0.5 h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                      <path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path>
                      <path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"></path>
                    </svg>
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="p-9 border-b border-gray-200">
          <p class="font-medium text-sm text-gray-400"> Note </p>
          <p class="text-sm"> Thank you for your order. </p>
        </div>
        <table class="w-full divide-y divide-gray-200 text-sm">
          <thead>
            <tr>
              <th scope="col" class="px-9 py-4 text-left font-semibold text-gray-400"> Item </th>
              <th scope="col" class="py-3 text-left font-semibold text-gray-400">  </th>
              <th scope="col" class="py-3 text-left font-semibold text-gray-400"> Amount </th>
              <th scope="col" class="py-3 text-left font-semibold text-gray-400"> Discount </th>
              <th scope="col" class="py-3 text-left font-semibold text-gray-400"></th>
            </tr>
          </thead>
          <tbody class="divide-y divide-gray-200">
            <tr>
              <td class="px-9 py-5 whitespace-nowrap space-x-1 flex items-center">
                <div>
                  <p> Jericho III (YA-4) </p>
                  <p class="text-sm text-gray-400"> Nuclear-armed ICBM </p>
                </div>
              </td>
              <td class="whitespace-nowrap text-gray-600 truncate"></td>
              <td class="whitespace-nowrap text-gray-600 truncate"> $380,000.00 </td>
              <td class="whitespace-nowrap text-gray-600 truncate"> 0% </td>
            </tr>
            <tr>
              <td class="px-9 py-5 whitespace-nowrap space-x-1 flex items-center">
                <div>
                  <p> Pym Particles (Pack of 10,000) </p>
                  <p class="text-sm text-gray-400"> Redacted Description </p>
                </div>
              </td>
              <td class="whitespace-nowrap text-gray-600 truncate"></td>
              <td class="whitespace-nowrap text-gray-600 truncate"> $280,000.00 </td>
              <td class="whitespace-nowrap text-gray-600 truncate"> 0% </td>
            </tr>
          </tbody>
        </table>
        <div class="p-9 border-b border-gray-200">
          <div class="space-y-3">
            <div class="flex justify-between">
              <div>
                <p class="text-gray-500 text-sm"> Subtotal </p>
              </div>
              <p class="text-gray-500 text-sm"> $660,000.00 </p>
            </div>
            <div class="flex justify-between">
              <div>
                <p class="text-gray-500 text-sm"> Tax </p>
              </div>
              <p class="text-gray-500 text-sm"> $0.00 </p>
            </div>
            <div class="flex justify-between">
              <div>
                <p class="text-gray-500 text-sm"> Total </p>
              </div>
              <p class="text-gray-500 text-sm"> $660,000.00 </p>
            </div>
          </div>
        </div>
        <div class="p-9 border-b border-gray-200">
          <div class="space-y-3">
            <div class="flex justify-between">
              <div>
                <p class="font-bold text-black text-lg"> Amount Due </p>
              </div>
              <p class="font-bold text-black text-lg"> $360.00 </p>
            </div>
          </div>
        </div>
      </div>
    </article>
  </div>
</section>

Install tailwind css of verion 2.2.19

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

<script src="https://cdn.tailwindcss.com"></script>
  • bg-gray-100
  • py-20
  • max-w-2xl
  • mx-auto
  • py-0
  • md:py-16
  • overflow-hidden
  • bg-white
  • p-9
  • border-b
  • border-gray-200
  • flex
  • h-6
  • mb-4
  • text-lg
  • text-sm
  • text-gray-400
  • inline-flex
  • text-blue-500
  • ml-0.5
  • h-4
  • w-4
  • w-full
  • px-9
  • py-4
  • text-left
  • py-3
  • py-5
  • text-gray-600
  • text-gray-500
  • text-black
  1. Control the background color of an element to gray-100 using the bg-gray-100 utilities.

  2. Control the vertical padding of an element to 5rem using the py-20 utilities.

  3. Set the maximum width/height of an element using the max-w-2xl utilities.

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

  5. Control the vertical padding of an element to 0rem using the py-0 utilities.

  6. Control the vertical padding of an element to 4rem at only medium screen sizes using the md:py-16 utilities.

  7. Use overflow-hidden to clip any content within an element that overflows the bounds of that element.

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

  9. Control the padding on all sides of an element to 2.25rem using the p-9 utilities.

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

  11. Control the border color of an element to gray-200 using the border-gray-200 utilities.

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

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

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

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

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

  17. Control the text color of an element to gray-400 using the text-gray-400 utilities.

  18. Use inline-flex to create an inline flex container that flows with text.

  19. Control the text color of an element to blue-500 using the text-blue-500 utilities.

  20. Control the margin on left side of an element to 0.5 using the ml-0.5 utilities.

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

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

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

  24. Control the horizontal padding of an element to 2.25rem using the px-9 utilities.

  25. Control the vertical padding of an element to 1rem using the py-4 utilities.

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

  27. Control the vertical padding of an element to 0.75rem using the py-3 utilities.

  28. Control the vertical padding of an element to 1.25rem using the py-5 utilities.

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

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

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

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to create a Simple Invoice with External Links components, learn and follow along to implement your own components.