Signal Garden

设计资源DESIGN· UI-KIT

twin.macro

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.

适用平台Platforms
vscode
已识别的要求Documented requirements
未确认Not confirmed
许可LICENSE
MIT

每周一 1 封:本周热度最高的 10 个 GitHub 新项目。免费,随时退订。One email each Monday: the 10 hottest new GitHub projects this week. Free, unsubscribe any time.

订阅即表示你同意我们按隐私政策发送每周一周刊。我们会记录这次订阅的来源页面和活动标签,这条记录不包含 IP 地址。Subscribing means you agree that we email the Monday weekly digest as described in the privacy policy. We record the referring page and campaign tag for the signup, and that record does not include an IP address. 隐私政策Privacy Policy

能力CAPABILITIES

它能帮你做成什么What it helps you do

  1. 01

    在JSX里用tw属性直接写Tailwind类名

  2. 02

    用模板字符串组合动态样式

  3. 03

    用styled创建样式化的组件

  4. 04

    用分组写法简化多个变体样式

  1. 01

    Write Tailwind classes directly inside JavaScript

  2. 02

    Use Tailwind with any CSS-in-JS library

  3. 03

    Get plain style objects at build time (zero runtime)

  4. 04

    Apply classes conditionally with standard logic

  5. 05

    Create reusable style fragments with the css macro

上手GET STARTED

怎么装How to install

文档里没有找到可识别的安装命令。这类项目按发布规则不会进入榜单,只能在这里查看。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.

打开项目文档Open project documentation ↗

文档未说明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

限制与风险Limits and risk

以下要求与风险来自文档静态检查,未执行项目代码;扫描没有命中,不代表使用安全。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

01需要 API KeyREQUIRES API KEY
未在文档中发现Not found in the docs
02需要本地环境NEEDS LOCAL RUNTIME
未在文档中发现Not found in the docs
03需要 DockerNEEDS DOCKER
未在文档中发现Not found in the docs
04难度DIFFICULTY
未识别Not identified
05许可LICENSE
MITMIT
06阶段STAGE
长期未更新Not updated
创建于 19 FEB 2020Created 19 FEB 2020

静态扫描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

它现在处在什么位置Where it stands right now

首次发现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

相关讨论RELATED DISCUSSIONS

每周一周刊Monday weekly digest

每周一 1 封:本周热度最高的 10 个 GitHub 新项目。免费,随时退订。One email each Monday: the 10 hottest new GitHub projects this week. Free, unsubscribe any time.

看第 1 期Read issue 1

订阅即表示你同意我们按隐私政策发送每周一周刊。我们会记录这次订阅的来源页面和活动标签,这条记录不包含 IP 地址。Subscribing means you agree that we email the Monday weekly digest as described in the privacy policy. We record the referring page and campaign tag for the signup, and that record does not include an IP address. 隐私政策Privacy Policy

订阅每周一周刊Subscribe to the Monday weekly digest
PROVENANCE · 这些结论的依据是什么Where these conclusions come from
来源 URLSource URL
https://github.com/ben-rogerson/twin.macro
原始数据哈希Raw data hash
b9dfaad48514d24d23c0c14782ac06ad
解析时间Parsed at
2026-10-04T23:15:31.824Z
最后一次验证Last verified
2026-11-19T22:14:42.458Z
增长测量时间Growth measured
2026-10-10T23:41:53.363Z
发现查询Discovery queries
focus:web:repo:topic-tailwindcss
分类来源Category source
rules
焦点Focus
web (11)

依赖:Dependencies:@babel/template, babel-plugin-macros, chalk, lodash.get, lodash.merge, postcss-selector-parser, tailwindcss

完整解析证据 JSONFull parse evidence JSON
{
  "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
}