Introduction

The team over here at DevDojo are huge fans of Alpine and Tailwind 🤩 We love it so much that we are fine-tuning and open-sourcing our library of UI elements that we've been crafting over the years.


Why Tailwind and Alpine?

When used together, Alpine and Tailwind complement each other and allow developers to build re-usable and functional UI elements with minimal effort. By using Alpine directives for functionality and Tailwind utility classes for design, we can create beautiful and functional interfaces represented by using only HTML.

An Example

Here is an example of a simple dropdown with minimal code 👇

Copied!
  • Menu Item 1
  • Menu Item 2
<div x-data="{ open: false }" @click.outside="open=false" class="relative text-sm">
    <button @click="open=!open" class="bg-white rounded-md shadow-sm cursor-pointer">
        <span class="block px-4 py-2">Dropdown</span>
    </button>
    <ul x-show="open" class="absolute origin-top-left top-0 w-32 p-4 mt-10 bg-white rounded-md shadow-sm" x-transition x-cloak>
        <li>Menu Item 1</li>
        <li>Menu Item 2</li>
    </ul>
</div>

Inspiration

As we design and develop websites, it is essential to recognize the contributions of those who came before us. We stand on the shoulders of giants, learning from their success, and using their knowledge to improve our work. With that said, we have taken inspiration from these handful of Open Source projects below. Be sure to check them out.

  1. Tailwind CSS
  2. Alpine JS
  3. Radix UI
  4. ShadCN UI
  5. Get UIKit
  6. Sonner