Description
From the slack channel:
harmon:
anyone make progress with a tailwind surface component library? I am finding tailwind a bit too flexible to easily abstract further - also need to keep the class names intact (not do string concat) to ensure purge css works when generating production css
also to do things like modals effectively - does need some js code - we should try to standardize the approach for shipping components with some hooks, or that require alpine..
lnr0626:
i've been working with tailwind ui, so I can't release the components i've built :-(
harmon:
hmm yea - is it just a tailwind plugin? or how does tailwind UI extend on tailwind? - Think i might pull the trigger on that also... would like the tailwind ui components...
suppose requiring alpinejs on a tailwind component lib would be sensible - it would probably be the recommended approach from the tailwind devs is tailwind UI really just some markup they give you? - they must mention not sharing that in the license agreement...
pretty thin line between creating some tailwind button component library (for example) and not stepping on the tailwind UI license
lnr0626:
they give you the markup, tell you which classes to modify on which elements, and a few other things (they might have some vue/react stuff, but i haven't paid attention to that)
the cost was worth it for me, but i also don't have anyone that's dedicated to doing design and so it just help relieve cognitive load
harmon:
it is otherwise a very fair license, stifling a bit for this type of idea though..
yea agree, value is there for sure
lnr0626:
yeah, hard to create a component lib once you've seen the actual markdown cause at the end of the day they aren't doing anything too crazy (i.e. there aren't too many ways to create a button that has an outline on focus and some changed emphasis on hover)
harmon:
Examples of use not allowed by the license:
- Creating a React or Vue version of Tailwind UI and making it available either for sale or for free
straight from the license ^ - think that would apply to us also
best we could do is streamline getting tailwind setup in a phoenix/liveview/surface project
paulstatezny:
Yeah, It’s too bad, we’re doing the same thing with TailwindUI, which is really great stuff.
msaraiva:
it would be great to have our own surface_tailwind. Regarding the license which states that is not allowed to:
- Creating a React or Vue version of Tailwind UI and making it available either for sale or for free
I believe they mention React and Vue because that's what they use to provide components for JS. Creating similar components using Surface would already be different in many ways as we're creating server-side components using another language. As far as I can see, the text above doesn't say we can't create server-side templates that use some of the same utility classes. That would be really hard to do since the utility classes are common and free and there are not too many different ways to create some of the simplest components. This drives me to a few question. Are there any other TailwindCSS based component suites out there? Are they free? If so, don't they use the same (or similar) set of utility classes to build their components?
harmon:
that is the complication really - some of the UI components are free, some are not - would be difficult to say if we did create a toggle for example - if it was the same utility classes as is used in the TailwindUI components (even by accident) - would that somehow be in breach of the tailwind UI license?