twin.macro
tsdx
Our great sponsors
twin.macro | tsdx | |
---|---|---|
57 | 45 | |
7,798 | 11,146 | |
- | 0.3% | |
6.1 | 0.0 | |
12 days ago | 10 months ago | |
TypeScript | JavaScript | |
MIT License | 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.
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.
tsdx
-
ReactJS Good Practices
tsdx - Zero-config CLI for TypeScript package development
-
Help with bundling a module using webpack
If you’re into TypeScript, I highly recommend https://tsdx.io . I’ve used it to create a package before and it’s so much easier
-
Using Next.js components in a custom npm library
Thanks for the insight fellas. Aside question, I was thinking of bootstrapping the project with tsdx, but their last release was well over 2 years ago. Wondering if there are any alternative options for creating libraries?
-
Rollup Library Starter
NOTE: If your project uses TypeScript, I would suggest using tsdx instead.
-
Creating Modern npm Packages
Sadly, it's a bit dead. We switched to dts-cli fork, but tsup looks good too
-
TypeScript is terrible for library developers
I don't depend on the actual typescript docs much but thankfully in @types and in tons of repos there are examples of well written typescript code.
The amount of JS and TS out there is also a bit of a foot gun though so stick with heavily used/starred libs if you aren't sure.
One tool that helps a lot with developing libraries in typescript is TSDX[0] or its successor dts-cli[1] and there is a bunch of good stuff in awesesome-typescript[2].
Maybe library devving is harder?(more work?) with tyepscript but it is worth it for the end developer, especially if that end developer is you. If you aren't using your own libs then you're probably getting paid by someone else to make them or... idk.
-
How to create your own React Components library
We will use a TSDX library - this tool is something similar to create-react-app, but for creating components library. It allows as to initialize a project immediately with already set up bundler, Rollup with Typescript supporting, testing with Jest, code formatter, Prettier and Storybook.
-
Is there a point in writing in TypeScript personal projects that I will maintain myself?
May be you need to try https://tsdx.io/
-
The Node ecosystem (still) has tooling problems
So what is the ideal way to build TypeScript libraries? I've heard that tsdx https://tsdx.io/ is quite good
-
React component library - 2022 where to start
There’s tsdx. But I’d recommend using Vite and storybook-vite
What are some alternatives?
twind - The smallest, fastest, most feature complete Tailwind-in-JS solution in existence.
Microbundle - 📦 Zero-configuration bundler for tiny modules.
Tailwind CSS - A utility-first CSS framework for rapid UI development.
turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]
tailwindcss-classnames - Functional typed classnames for TailwindCSS
parcel - The zero configuration build tool for the web. 📦🚀
jest-styled-components - 🔧 💅 Jest utilities for Styled Components
tsup - The simplest and fastest way to bundle your TypeScript libraries.
vue-emotion - Seamlessly use emotion (CSS-in-JS) with Vue.js
create-react-app - Set up a modern web app by running one command.
tailwind-safelist-generator - Tailwind plugin to generate purge-safe.txt files
nx - Smart Monorepos · Fast CI