Pinned Tweet
I just open-sourced my first Django package: Cotton. Inspired by Vue, Svelte and Laravel Blade components, it brings component-based design to Django templates. Check it out! 🙏 github.com/wrabit/django-cot…
I finally found some time to finish the first release of an official (yet completely optional) Cotton UI Kit. As we're still <v1 there could be some changes but having already ironed out a lot of creases I'm using comfortably on 3 projects.
django-cotton.com/ui
Will retweeted
A few things I've noticed as all devs write code with AI.
When you write foundational / architectural code of a new project by hand, you "feel" the code pushing back if your abstraction isn't right. You feel when something is harder than it should be. The code is telling you it's not in the right shape. Good engineers are sensitive to this.
When you're using an LLM, you keep pushing right through this in a way that feels like you're making progress, and it may even be directionally correct in a sense, but the underlying foundation of it all is actually bad in a way that either kills progress of the LLM later as it buckles under the complexity it has created or destroys your ability to maintain the code long term.
Related to this, I see a general restlessness with just sitting and thinking about a problem for a while.
As I've been working on a new library here at Laravel, there have been days where it feels like I mainly just stare at my screen thinking about something. When Claude Code is at your fingertips, it's tempting to just start yapping into the terminal and watching code come out the other end. Again, directionally correct in some ways, but often doesn't land on the elegant solution that is waiting to be discovered.
Will retweeted
I wrote up a blog post demonstrating my reason for starting to use django-cotton.
In short: when I want an include that can accept one or more blocks of HTML, I'll use a component instead.
treyhunner.com/2025/03/djang…
#Python #Django
github.com/wrabit/django-cot…
1.6.0 allows you to reduce some markup for grouped components, simplifies folder structure too.
Will retweeted
Currently trying Django Cotton in pair with @htmx_org and django-template-partials and.. it's a banger !
Trying to see if I really need template partials though if you go full component mode with django cottons.
Once everything is its own component and with the flexibility django cotton adds, I don't really see a good use case.
I am building a small library of components based on Daisy UI and with HTMX doing it's magic + django's ORM and features in the backend, really is the best DX.
Will retweeted
Because of @eshatjubayer I’m transitioning my auction front end from streamlit to Django cotton.
django-cotton.com/docs/quick…
Will retweeted
はてなブログに投稿しました
DjangoテンプレートエンジンのDjango Cottonを試す - 偏った言語信者の垂れ流し tokibito.hatenablog.com/entr…
#はてなブログ #力強くアウトプットする日
Will retweeted
django-cotton: Bringing Component Based Design to Django Templates #python github.com/wrabit/django-cot…
Will retweeted
Writing reusable and composable UI components can be achieved using the good 'ol django templates, with the help of some libraries to fill in the gaps (like django-components, django-cotton and TailwindCSS)
Check out my talk at Djangocon US
Will retweeted
To the dads with young, young kids, here's my one piece of advice. Become a morning person, and fit all of your hobbies into the hour or so before everyone else in your house wakes up.
Read, hike, play a video game, whatever you like. But at 6am. :/ You'll get used to it haha.
Will retweeted
#django cotton seems like the missing piece when you are building large applications. If you are a serious django developer you owe it to yourself to give it a try.
Will retweeted
Now you can create amazing reusable React-like component in Django with django-cotton. I've been waiting this for a long time.
Will retweeted
New video: Django Cotton in Five Minutes—the component system you've been looking for.
youtube.com/watch?v=9-ZFz-xw…
Will retweeted
A reusable component system was the last missing piece to building serious front ends in the Django / HTMX low-JavaScript world.
I've only been using it for a couple weeks but so far cotton feels like the answer.
I just open-sourced my first Django package: Cotton. Inspired by Vue, Svelte and Laravel Blade components, it brings component-based design to Django templates. Check it out! 🙏 github.com/wrabit/django-cot…
Will retweeted
Wow, django-cotton is incredible.
Define, use with `<c-button>` (or whatever the template name is) and see the results.
I've been wanting a shadcn-like template for Django. I think django-cotton is the key to making that happen.
Just needs to learn a few more bits about it.
Will retweeted
I just published a Django Cotton component library of Heroicons. It's super simple to use and has all the latest icons. Here's a quick taste:
<c-heroicon.check-circle />
pypi.org/project/cotton-hero…
Will retweeted
If you're a Django developer that uses HTMX or otherwise relies heavily on SSR and Django templates, you need to check out django-cotton. django-cotton.com/
Finally broke out of the 0.9.x loop. cotton 1.0.0 released with a backend overhaul, seeing up to 32% better performance..
github.com/wrabit/django-cot…























