Loading...
question tailwind front-end September 19, 2024 How to create a tooltip with just Tailwind CSS (no libraries)?

This blog post shows you how you can create a simple tooltip with some text in it that shows up on hover. This solution only utilises the classes available in TailwindCSS. It doesn’t depend on any 3rd party libraries.

question react tailwindcss September 19, 2024 A simple React Tooltip component that uses TailwindCSS only (no libraries)

Here’s a React component that allows you to attach the tooltip to any element by passing it as a child. The component will render the tooltip and an arrow pointing downward.

question tailwindcss front-end February 23, 2024 How to create a generic Dialog component in TailwindCSS that takes in title, description, etc. as props?

If you want to create a separate, generic Dialog component where you can pass in the title and description as props, you can do so by defining a reusable Dialog component. You can even pass HTML content in the description of the Dialog component, you can do so by utilizing React’s dangerouslySetInnerHTML attribute. Here’s how you can achieve this:

question front-end tailwindcss February 17, 2024 How to center an element using Tailwind CSS?

In Tailwind CSS, you can center an element using flexbox utilities directly in your HTML markup. Here’s how you can center an element horizontally and vertically: