Show HN: LangCSS – An AI Assistant for Tailwind (langcss.com)
Hi All
This is my personal project that is an IDE and AI assistant for creating tailwind components and pages. You can chat to create designs, then make small edits yourself, and continue chatting to refine them. I am always working to improve the UX.
I have a time limited demo page here: https://langcss.com/demo
Please let me know what you think! Feedback is welcome.
Tech wise, this just uses NextJS (Hosted on Docker) and Azure Open AI.
143 comments
[ 2.0 ms ] story [ 239 ms ] threadI love the idea.
For a website that produces designs, your landing page looks a bit simple.
I asked it to generate a table. Now I'm not sure if the progress bar on top shows the code generation progress or if I'm running out of demo time.
It took a while but now I have a table, thats pretty cool :)
Said another way (my interpretation):
Imagine that you need an AI to write the bespoke tailwind syntax for you instead of having it write normal css.
Any tailwind class can have named colors ("green"), semantic colors "danger" and then you can chose the number of the gradient of that color.
There are thousands of them. Only the ones you use get compiled into the css file.
> Combined with minification and network compression, this usually leads to CSS files that are less than 10kB, even for large projects. For example, Netflix uses Tailwind for Netflix Top 10 and the entire website delivers only 6.5kB of CSS over the network. - https://tailwindcss.com/docs/optimizing-for-production
What does increase is the html or react payload. But at least it's only sending what you use.
Most websites are sending all of the styling for all of the pages and states, even though the user never sees it. It takes work to optimize that away, and things go wrong often.
There are many clever macros like `space-x-4` that compile to very tricky effects. You couldn't write that in the style attribute at all. https://tailwindcss.com/docs/space#add-horizontal-space-betw...
For anyone still wondering why wouldn't I just write css? Because my codebase is littered with orphaned dead css. You can try to use strict naming conventions to connect it to the component it was meant for, but in practice you end with more css, dead css, and you have to read two source code files: component and css.
I'm not in the market for this (not convinced by Tailwind or by the AI assisted coding, yet) but people who are may need more than a few minutes to properly judge it.
And the pricing is outrageous, this is more expensive than subscribing to ChatGPT, with not much benefit other than a visual preview that can be accomplished with copy/paste.
> This is a lot slower to use than simply copying components from a pre-built UI library and making your own changes
Correct. This is something I am aware of, and next steps would be to make it easier to search and add free (open source) components to build up the UI. In retrospect I probably should have started with that, and then AI'd it.
> You wouldn’t use Tailwind and any of its surrounding products unless you knew the syntax and what it does.
This is true, but often as a Tailwind user I am stumpted on "how to create the thing in my mind". A good example is gradient text, but where the bottom of a letter like g is not cropped.
> And the pricing is outrageous, this is more expensive than subscribing to ChatGPT, with not much benefit other than a visual preview that can be accomplished with copy/paste.
It might be. The $30/m price for an ChatGPT wrapper has to have very good fit for someone, and I am probably not there yet.
(You need to sign in, then you have unlimited generations.)
Source code: https://github.com/gitwitorg/gitwit-server
It's still in beta and pretty buggy, but happy for feedback as well!
Until something comes out which performs auto generation of boilerplate/project code (against technical specs) I’m going to stick with test generation, as that is the only consistent output from LLMs that makes sense in my workflow.
You were able to deliver, ChatGPT was not.
Congrats on the launch. I enjoyed that it gave me progress updates as it worked.
We're working on a similar--but general-purpose--LLM-based software agent[1]. General purpose tasks are very hard, and we too are finding that tackling narrow use cases one at a time works much better!
I have an open PR to start moving in this direction [2]
[1] https://github.com/opendevin/opendevin
[2] https://github.com/OpenDevin/OpenDevin/pull/1238
Here's an idea: produce designs that use the commercial Tailwind components. Your designs will look great. Have a link for the user to buy the components if they don't already own them. Work out an affiliate deal with Tailwind Labs. You can get rid of the time limits and the pricing.
If you start generating money for them they may buy your app.
Not the best demo, to be honest.
In a 8 hours day of work, I must write code at most for 2 or 3 hours, and any AI would certainly not help me unless it can understand the meaning and intention of weird C++ code. We're relatively safe for the moment.
Tailwind will be a no brainer for it since it's all one line and would still be readable/tweakable to the user.
Candidly, producing components from scratch like this, I just haven't seen anyone do a great job.
Now, rewriting, tweaking, and plugging in content? Really good at modifying if you can get it to be fast.