设计资源DESIGN· UI-KIT
ben-rogerson/twin.macro
在 JS 里直接用 Tailwind 类名写样式,编译时自动转成 CSS 对象。A build-time Babel macro that brings Tailwind utility classes into CSS-in-JS for React and other frameworks.
根据公开文档整理,未运行实测;费用以项目官网为准。Based on public documentation, without runtime testing. Check the project site for pricing.
能力CAPABILITIES
在JSX里用tw属性直接写Tailwind类名
用模板字符串组合动态样式
用styled创建样式化的组件
用分组写法简化多个变体样式
Write Tailwind classes directly inside JavaScript
Use Tailwind with any CSS-in-JS library
Get plain style objects at build time (zero runtime)
Apply classes conditionally with standard logic
Create reusable style fragments with the css macro
上手GET STARTED
文档里没有找到可识别的安装命令。这类项目按发布规则不会进入榜单,只能在这里查看。No recognisable install command was found in the docs. Projects like this never enter the ranked list under our publishing rules — they are viewable here only.
文档未说明No install command is shown in the evidence, but add twin.macro to your project using npm or yarn and import it as demonstrated in the readme.
使用限制LIMITATIONS
以下要求与风险来自文档静态检查,未执行项目代码;扫描没有命中,不代表使用安全。Risk here is evidence, not an alarm. These findings come from static scanning of the docs; we never execute a project’s code.
限制LIMITS
未知Unknown
静态扫描STATIC SCAN
在 README、SKILL.md 和依赖清单中没有匹配到已知风险模式。No known risk patterns matched in the README, SKILL.md or dependency list.
静态扫描未发现明显风险,但不代表安全。The static scan found no obvious security risks in the documentation, but a clean scan does not guarantee the code itself is safe.
项目动态PROJECT ACTIVITY
首次发现FIRST SEEN
03 OCT 202603 OCT 2026
增长GROWTH
+0.0%+0.0%
8.0k → 8.0k stars · 48 个快照8.0k → 8.0k stars · 48 snapshots
讨论DISCUSSION
1 SOURCES1 SOURCES
1 条外部提及1 external mentions
状态STATUS
长期未更新Not updated
它让你在 JSX 中直接写 Tailwind 类名,构建时转为 CSS 对象,省去了手动写 CSS-in-JS 样式的麻烦。Over 8,000 GitHub stars show strong community adoption
HN_STORY · 52 points · 95 comments
依赖:Dependencies:@babel/template, babel-plugin-macros, chalk, lodash.get, lodash.merge, postcss-selector-parser, tailwindcss
{
"agents": [
{
"agent": "vscode",
"evidence": "readme: …ks with the official tailwind vscode plugin** - Avoid having to lo…"
}
],
"apiKey": null,
"docker": null,
"taxonomy": {
"scores": {
"design": 3,
"ai-tools": 0,
"dev-tools": 0,
"indie-web": 0,
"skill-agent": 0,
"productivity": 0
},
"primary": "design",
"secondary": "ui-kit"
},
"localRuntime": null,
"skillMdTotal": 0,
"skillMdErrors": [],
"treeTruncated": false,
"categoryScores": {
"data": 0,
"agent": 0,
"media": 0,
"design": 12,
"browser": 0,
"devtool": 0,
"security": 0,
"marketing": 0,
"productivity": 0
},
"classification": [],
"scannedSources": [
"readme"
],
"skillMdFetched": 0
}