Show HN: Flowbite – Tailwind CSS Components Library
flowbite.com
flowbite.com
From the development perspective and from other comments that are here, and also from many articles like: https://dev.to/jaredcwhite/why-tailwind-isn-t-for-me-5c90 or https://dev.to/neophen/tailwind-is-bad-because-i-don-t-like-... or https://betterprogramming.pub/tailwind-css-is-probably-overh... you can see that there are still a lot of people who hate the way Tailwind work with classes. But in the same time you can see that they have a steady grow month over month since April 2019: https://www.similarweb.com/website/tailwindcss.com/ that means some people love the way Tailwind is working with utility classes.
So I think this is a really good extension that can speed up the development process of people who like Tailwind. For those who don't like Tailwind, there are many other alternatives. There is no such thing that can fit for everybody.
Some questions 1. What did you use to create the docs? 2. What are your next steps with this project?
1. We used HUGO as a static site generator and Webpack to put things together using markdown files. (it's open-source: https://github.com/themesberg/flowbite including the HUGO source files)
2. We're now working on the application UI code (pro version) but we will also add new components and external styled plugins (datepicker, charts) to the open-source library.
We have a roadmap on the landing page: https://flowbite.com/#roadmap
I think where it shine most is when you are making your own UI and need to deploy different components/customizations, ie: If you are doing a single page site is not that obvious "why is like this?", but generating UIs on the fly for a admin backend and suddenly THIS IS THE WAY!.
TailwindCSS is like static types for UI. Note:
<button class="button"> == fn sum(a,b)
<button class="font-bold block px-4 py-2 m-1 rounded shadow outline-none text-center bg-primary-700 text-white"> == fn sum(a:U16,b:i32):Result<i64, Error>
The "verbosed" nature of both cause some hate, but you will appreciate it the more big/complex the project is.What you get with tailwind is exact understand of each component and how it will look based on their "types"/classes.
What you get with others like bootstrap is too abstract/implicit looks that you can't figure at a glance. So, tailwinCSS like static typed programming is optimized for "a glance"/local understanding.
What is also very counterintuitive is that my tailwind pages are LESS heavy than boostrap! (true for html and CSS)
When I use stuff like Bulma or Bootstrap instead of Vuetify I feel like I’m doing 10x the amount of work for 0x more customization or optimization.
Is there a case to be made for a Tailwind component library for my use-case?
Under components are some great looking components with copy-pasteable code. Can I just copy-paste that into a website? If I do then do I need to copy in an MIT license attribution too into that source code where I use it? If I can copy-paste from there without issue then what would I be paying for if I purchased "Tailwind CSS code"? Is it like Tailwind UI where these components are available for free but paying unlocks loads more?
The pro version includes fully coded pages and layouts (ie. dashboard layout, landing pages, e-commerce pages) that can accelerate your development even more. We also work based on a Figma file that is based exclusively on the default Tailwind utility classes and you can get that too in the pro version (although there is also a free one posted on the Figma community with the base components).
I think we should create a page comparing licenses and making it clearer.
Update: I read it and it's unclear, so that's a no then.
Components => download files
Tailwind UI components => FlowBite elements
Tailwind Labs Inc. => Crafty Dwarf LLC
Tailwind UI License: https://tailwindui.com/license
Flowbite License: https://flowbite.com/license/
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/ta...
Color Scheme follow a similar pattern 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/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/sr...
I hope this is useful to few who wants to use Tailwind in either of the two ways.
- I want something lightweight and not bother to deal with compiling/preprocessing (like Milligram).
- I want a MVP without classes (like Picnic.css)
Otherwise I pay a premium theme or create one myself.
> And why aren't there more?
It seems to me these tightly coupled CSS + JS component frameworks are in an awkward position these days. React/Vue allows you more flexibility. If a project is really simple you can use vanilla JavaScript or something like Alpine.js.
Perhaps the demand isn't there anymore.
And this makes sense because I'm not browsing the docs looking for markup that I like. I'm looking for a suitable UI component and only once I've picked something am I interested in the specific markup for that one chosen component.
Your docs at the moment have the effect of emphasising the markup more than anything else on the page (due to the dark-themed code snippets, which normally I like!) and when I'm in UI design mode, I'm thinking very visually and really only want to see a clean page listing the various components available.
Other than that, the docs are great so this is only a possible optimisation rather than a major big deal!
https://medium.com/@jacobp100/tree-shaking-bootstrap-95d6301...
I'd love to hear people's thoughts on Flowbite vs DaisyUI. Is it worth the switch?
We chose a cleaner and more enterprise design to target high-end developers and companies.
I suppose that the differences and whether one or the other is better depends on your project and what you want.
So DaisyUI is more for weekend projects where devs themselves own the design.
Whereas Flowbite is meant more for working with a real designer and easily translate the professional design into tailwind-based code.
Cool. Thanks!
Doesn't it kind of defeat the purpose of Tailwind?
The BEM philosophy is to capture individual pieces of your UI as unique CSS classes (.Button, .Button-icon, Button-text). The "utility first" approach removes that abstraction entirely.
Anecdotally I've built hundreds of websites, and worked on many product teams building web applications all with varying team/product sizes and in my experience BEM scales very poorly. I have never worked on a BEM codebase without a shocking level amount of tech debt. Adding new UI requires creating new CSS files, refactoring existing UI requires also refactoring the separate CSS files, removing UI is the same thing. Due to this disconnect, old code tends to stick around.
One of my product teams moved from BEM to Tailwind and productivity/maintainability improved tremendously.
To me this says more about the development practices of that team than about BEM. Chiefly you should be able to automatically determine if a given block, element or modifier is still used/needed. How did they wind up in such a situation?
Meanwhile Tailwind is functionally equivalent to this:
https://twitter.com/samthor/status/1402825668061130755
I would say that this is nice for prototypes, but given how it disincentivises reuse, refactors take an amount of time proportional to the number of instances - that's really bad.
Also since there's no composition, just by looking at the codebase it's not clear if a change is something that should propagate to other, similar instances or land only there.
[0] https://tailwindcss.com/docs/functions-and-directives#apply
Well you could say that BEM requires strict development practices to work well. This is could be a downside for many teams, seeing as this comes at a cost which grows as your team/product do. Organizational overhead is a significant factor when considering a technical solution.
> Meanwhile Tailwind is functionally equivalent to this:
It's a funny platitude, similar to the argument that "Tailwind is just like inlining CSS" but it's of course overly simplified. Variable support, hover/active/other states, and of course breakpoint-specific variants for all of the classes making responsive styles possible.
> Also since there's no composition, just by looking at the codebase it's not clear if a change is something that should propagate to other, similar instances or land only there.
Even with BEM, you usually store components in partials/templates to keep everything contained and to reduce duplication. So in this regard the composition is the same. You import a button in your code, you aren't writing out this every time:
<a class="button" target="nofollow" onClick="..."> <span class="button__icon"><svg ...></span> <span class="button__inner--withIcon">Blah</span> </a>
The composition happens within the templates themselves.
EDIT: I'll follow up and say that the "composition" for Tailwind components works very similar to CSS Modules (CSS is scoped to a component, and delivered with the component itself), or StyledComponents (similar to CSS Modules, but built into the React component itself). But with a few more benefits:
1. Does not rely on a build system to bundle/deliver styles
2. Less abstraction; no need to create scoped classes even (in the case of CSS Modules)
3. Works outside of the JS/React ecosystemTailwind can be used to build/write "StyledComponents". And one can write in the style/methodology/philosophy of BEM.
All the the above terms are all of different categories.
If you're on a screen, it makes no difference.
If you use a screen reader/braille display, you will only be informed about a small subset of "semantic" html elements, such as headings, lists, links, and tables.
If you think it matters for "XML" reasons, well, it's not 2006 anymore.