2 ms·
At a glance, this looks somewhat better, especially with customization/tokenization, than Tailwind's own TailwindUI. For those worried about the classes upon c
by Brajeshwar 5y ago
At a glance, this looks somewhat better, especially with customization/tokenization, than Tailwind's own TailwindUI.
For those worried about the classes upon classes in the HTML, I find it OK. OK, for hacking up marketing, landing, and websites. There are two ways of using a utility framework such as TailwindCSS.
1. Every module is HTML-designed and is seen from a designer's eye; know what they should look like. We see this in TailwindUI and here too with Flowbite.
2. Use Tailwind as a utility class and create CSS classes looking at the overall design and standardizing components.
Point No. 1 is more straightforward than 2 in the short term, but Point No. 2 would be the ideal approach and more easily maintainable.
Here are few examples from our website that uses Tailwind. Please be lenient; it is not a public consumable template/markup.
The general UI is driven by design token at the Tailwind configuration level -- https://github.com/valinorearth/valinor.earth/blob/master/tailwind.config.js https://github.com/valinorearth/valinor.earth/blob/master/ta...
Color Scheme follow a similar pattern https://github.com/valinorearth/valinor.earth/blob/master/tailwind.colors.js https://github.com/valinorearth/valinor.earth/blob/master/ta...
Then, we write CSS but using Tailwind as a utility - https://github.com/valinorearth/valinor.earth/tree/master/src/css https://github.com/valinorearth/valinor.earth/tree/master/sr...
For instance, for a button, instead of apply everything in each and every `<button>`, we create a `.button` class and create the button component of our choice https://github.com/valinorearth/valinor.earth/blob/master/src/css/component.button.css https://github.com/valinorearth/valinor.earth/blob/master/sr...
I hope this is useful to few who wants to use Tailwind in either of the two ways.