プロジェクト
概要
1行で再利用可能な React + Tailwind CSS コンポーネントを作成 ✨
Web・アプリ開発できること
- ⚡️ Lightweight — only 0.49kb
- ✨ Autocompletion in all editors
- 🎨 Adapt the style based on props
- ♻️ Reuse classes with asChild prop
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- +1
- 1か月
- +1
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナル
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
asChildprop - 🦄 Work with all components
- 😎 Compatible with React Server Components
- 🚀 First-class
tailwind-mergeandcvasupport
Documentation
Visit our official documentation.
Usage
Without twc:
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:
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é
関連プロジェクトを探す
読み込み中…