Published on

The Ninja Guide To How To Build A Whimsical - Pricing With Tailwind CSS Better

Whimsical - Pricing

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 Whimsical - Pricing ui component

Whimsical - pricing

Why use Tailwind CSS to make a Whimsical - Pricing ui component?

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

The preview of Whimsical - Pricing ui component

Free download of the Whimsical - Pricing's source code

The source code of Whimsical - Pricing ui component

<div class="h-screen flex justify-center items-center bg-gradient-to-t from-indigo-600 via-indigo-700 to-indigo-700">
  <card class="rounded w-72 shadow-xl flex flex-col text-gray-200">
    <!-- Title -->
    <p class="font-semibold bg-white bg-opacity-20 rounded-t px-4 py-2">PRO</p>

    <!-- Pricing -->
    <div class="flex flex-row items-center pt-8 bg-white bg-opacity-10 pl-12 pr-10 gap-3">
      <div class="flex flex-row gap-1">
        <span class="text-base"> $ </span>
        <p class="text-5xl font-semibold">10</p>
      </div>
      <p class="font-light text-xs">Per Editor / Month Billed Annually</p>
    </div>

    <!-- Pricing Additional Description -->
    <div class="flex flex-row items-center justify-center bg-white bg-opacity-10 pt-5 pb-10">
      <p class="text-xs text-gray-300 border border-gray-50 border-opacity-20 rounded-full py-1 px-2">$12 billed monthly</p>
    </div>

    <div class="grid grid-cols-12 bg-white bg-opacity-20 px-4 gap-y-3 pt-10">
      <!-- Details 1 -->
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
          <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
        </svg>
      </div>

      <div class="col-span-11 text-sm flex items-center font-semibold pl-2">Unlimited items per workspace</div>

      <!-- Line -->
      <div class="col-span-12 h-[1px] bg-white bg-opacity-20"></div>

      <!-- Details 2 -->
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
          <path stroke-linecap="round" stroke-linejoin="round" d="M10 19l-7-7m0 0l7-7m-7 7h18" />
        </svg>
      </div>

      <div class="col-span-11 text-sm flex items-center font-light pl-2">Everything in Starter</div>

      <!-- Details 3 -->
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
          <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
        </svg>
      </div>

      <div class="col-span-11 text-sm flex items-center font-light pl-2">10+ free guests per file or folder</div>

      <!-- Details 4 -->
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
          <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
        </svg>
      </div>

      <div class="col-span-11 text-sm flex items-center font-light pl-2">Priority support</div>

      <!-- Details 5 -->
      <div>
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
          <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
        </svg>
      </div>

      <div class="col-span-11 text-sm flex items-center font-light pl-2">Unlimited free viewers</div>

      <!-- CTA Button -->
      <div class="col-span-12 mt-20 mb-5 text-gray-100">
        <button class="rounded hover:bg-teal-400 bg-teal-500 w-full py-3">Try for Free</button>
      </div>
    </div>
  </card>
</div>

How to make a Whimsical - Pricing with Tailwind CSS?

Install tailwind css of verion 3.0.18

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

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

All the unility class needed to make a Whimsical - Pricing component

  • h-screen
  • flex
  • bg-gradient-to-t
  • w-72
  • flex-col
  • text-gray-200
  • bg-white
  • bg-opacity-20
  • px-4
  • py-2
  • flex-row
  • pt-8
  • bg-opacity-10
  • pl-12
  • pr-10
  • gap-3
  • gap-1
  • text-base
  • text-5xl
  • text-xs
  • pt-5
  • pb-10
  • text-gray-300
  • border-gray-50
  • border-opacity-20
  • py-1
  • px-2
  • grid
  • grid-cols-12
  • gap-y-3
  • pt-10
  • h-5
  • w-5
  • text-sm
  • pl-2
  • h-[1px]
  • mt-20
  • mb-5
  • text-gray-100
  • hover:bg-teal-400
  • bg-teal-500
  • w-full
  • py-3

43 steps to make a Whimsical - Pricing component with Tailwind CSS

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

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

  3. Control the background color of an element to gradient-to-t using the bg-gradient-to-t utilities.

  4. Use w-72 to set an element to a fixed width(18rem).

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

  6. Control the text color of an element to gray-200 using the text-gray-200 utilities.

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

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

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

  10. Control the vertical padding of an element to 0.5rem using the py-2 utilities.

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

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

  13. Control the background color of an element to opacity-10 using the bg-opacity-10 utilities.

  14. Adjust the left padding of an element to 3rem using the pl-12 utilities class

  15. Control the padding on right side of an element to 2.5rem using the pr-10 utilities.

  16. To specify the width between columns, you can use the gap-3 utilities.

  17. To specify the width between columns, you can use the gap-1 utilities.

  18. Control the text color of an element to base using the text-base utilities.

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

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

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

  22. Control the padding on bottom side of an element to 2.5rem using the pb-10 utilities.

  23. Control the text color of an element to gray-300 using the text-gray-300 utilities.

  24. Control the border color of an element to gray-50 using the border-gray-50 utilities.

  25. Control the border color of an element to opacity-20 using the border-opacity-20 utilities.

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

  27. Control the horizontal padding of an element to 0.5rem using the px-2 utilities.

  28. Use grid to create a grid container.

  29. Use grid to create a grid container.

  30. To specify the width between columns, you can use the gap-y-3 utilities.

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

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

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

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

  35. Adjust the left padding of an element to 0.5rem using the pl-2 utilities class

  36. Use h-[1px] to set an element to a fixed height([1px]).

  37. Control the margin on top side of an element to 5rem using the mt-20 utilities.

  38. Control the margin on bottom side of an element to 1.25rem using the mb-5 utilities.

  39. Control the text color of an element to gray-100 using the text-gray-100 utilities.

  40. Control the background color of an element to teal-400 using the hover:bg-teal-400 utilities on hover.

  41. Control the background color of an element to teal-500 using the bg-teal-500 utilities.

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

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

Conclusion

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