Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

twc

> 前端框架
Open source

Create reusable React + Tailwind CSS components in one line ✨

1.4K stars0 likes3 views
WebsiteGitHub

About

Create reusable React + Tailwind CSS components in one line ✨


TWC creates reusable React + Tailwind CSS components in one line

Features

  • ⚡️ Lightweight — only 0.49kb
  • ✨ Autocompletion in all editors
  • Adapt the style based on props
  • ♻️ Reuse classes with asChild prop
  • Work with all components
  • Compatible with React Server Components
  • First-class tailwind-merge and cva support

Documentation

Visit our official documentation.

Usage

Without twc:

typescript
import * as React from "react";

const Card = React.forwardRef<
  HTMLDivElement,
  React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
  <div
    ref={ref}
    className={clsx(
      "rounded-lg border bg-slate-100 text-white shadow-sm",
      className,
    )}
    {...props}
  />
));

With twc:

typescript
import { twc } from "react-twc";

const Card = twc.div`rounded-lg border bg-slate-100 text-white shadow-sm`;

Contributing

Feel like contributing? That's awesome! We have a contributing guide to help guide you.

Want to help improve the docs?

The docsite lives in the monorepo.

If you're interested in contributing to the documentation, check out the contributing guide.

Support

Having trouble? Ping me on X

Acknowledgement

The development of TWC was only possible due to the inspiration and ideas from these amazing projects.

  • styled-components - where it all started

License

MIT License © 2023-Present Greg Bergé

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptreactstyled-componentstailwindcss

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架