stailwc
twin.macro
stailwc | twin.macro | |
---|---|---|
7 | 57 | |
225 | 7,809 | |
- | - | |
7.2 | 5.9 | |
3 months ago | about 1 month ago | |
Rust | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
stailwc
-
React developers, how do you (continuously) test component changes without waiting so long for page refresh?
The answer is that babel / webpack is very very slow. I have seen refresh times go down from 15 seconds to less than 1 when swapping out babel and twin.macro to swc + my custom tailwind transpiler stailwc.
-
Railwind - A Tailwind compiler with warnings
I have also been working on stailwc https://github.com/arlyon/stailwc which is feature-complete enough to use in production, but is intended for use with css-in-js. The parser however is complete and should be fairly easy to reuse.
-
I released a significant update to stailwc, an SWC plugin that compiles tailwind to equivalent css-in-js 10x faster than babel (11 minute build down to <1 minute)
If you think this would be helpful, check it out here: https://github.com/arlyon/stailwc
- Is Turbopack really 10x Faster than Vite ?
-
Stailwc: a lightning fast tailwind -> css-in-js transpiler using rust + wasm
If this is something you are interested in getting involved with, please have a look at the discussions here: https://github.com/arlyon/stailwc/discussions/2 or try it out on your own project. Please open issues if there are plugins you absolutely need, as I'd love to improve your build times by 1000%.
-
Stailwc: an swc plugin for transpiling tailwind directives at compile time
Over the last few days, I started a project in rust targeting swc to replace twin.macro, namely stailwc.
twin.macro
-
Tailwindcss in Styled-Components
Twin Macro Github Repo. This is a great resource to help you pick up Twin’s syntax, learn more about the package, and keep up to date with the latest releases.
-
CSS Style Guide for Web Dev?
Personally I like twin.macro the most. It’s similar to the above but based on Tailwind.
-
Cool Tailwindcss Tools For Everyone
twin.macro is a library that allows you to use these styles in your JavaScript code. This library works exactly like styled-components.
- How do you css?
-
Fixing Class Composition in Tailwind CSS
One of the more promising alternatives is twin.macro - a Babel macro that processes Tailwind classes to generate JS objects understandable by various CSS-in-JS libraries. The developer experience (DX) of using it is amazing as you not only get all of Tailwind’s features without much change to your code, but you also get much more flexibility - all that on top of the traditional benefits of CSS-in-JS. Here’s an example code:
-
Setup Nextjs Tailwind CSS Styled Components with TypeScript
twin.macro
-
What unpopular webdev opinions do you have?
If you use Tailwind with React a lot, and are wanting support for Styled Components, give Twin Macro a look. They're close to finishing support for TW v3 in their Releases section :)
- Are utility classes horrible design or am I dumb?
- What's the proper way to write Tailwind with React?
-
Stailwc: an swc plugin for transpiling tailwind directives at compile time
The blocker for us using it is our use of an excellent library called twin.macro which is built against babel's transpilation APIs to parse tailwindcss directives at compile time so that they may be used with css-in-js libraries. This efficiently bundles your css so that you only ship the precise css you use. The problem is, it's all quite slow.
What are some alternatives?
website - Documentation for the SWC project.
twind - The smallest, fastest, most feature complete Tailwind-in-JS solution in existence.
tailwind-rs
Tailwind CSS - A utility-first CSS framework for rapid UI development.
railwind - Tailwind compiler rewritten in rust
tailwindcss-classnames - Functional typed classnames for TailwindCSS
jest-styled-components - 🔧 💅 Jest utilities for Styled Components
vue-emotion - Seamlessly use emotion (CSS-in-JS) with Vue.js
tailwind-safelist-generator - Tailwind plugin to generate purge-safe.txt files
tailwindcss-intellisense - Intelligent Tailwind CSS tooling for Visual Studio Code
tsdx - Zero-config CLI for TypeScript package development
tailwind-react-datepicker - React-datepicker styled with Tailwind CSS. Not a package.