@wedevs/tail-react
v1.2.1
Published
A React UI component library based on Tailwind CSS
Downloads
423
Readme
Tailwind CSS + React Component Library
This repository contains a collection of reusable React components styled with Tailwind CSS. The components are designed to be easily integrated into your React projects, providing a consistent and visually appealing user interface.
Installation
To use this component library in your project, you can install it via npm or yarn.
npm install @wedevs/tail-react
# or
yarn add @wedevs/tail-reactUsage
Tailwind CSS v4
On your app.css file, add the source file:
+ @source './node_modules/@wedevs/tail-react/dist/index.{js,ts,jsx,tsx}';Customizing the theme color
By default, the component library uses indigo as the primary color. You can customize this using the TailReactBaseColorProvider:
import { TailReactBaseColorProvider, Button } from '@wedevs/tail-react';
function App() {
return (
<TailReactBaseColorProvider color="blue">
{/* All components inside will use blue as the primary color */}
<Button variant="primary">Primary Blue Button</Button>
</TailReactBaseColorProvider>
);
}Available color options include all Tailwind CSS colors:
slate,gray,zinc,neutral,stonered,orange,amber,yellow,limegreen,emerald,teal,cyan,skyblue,indigo(default),violet,purple,fuchsiapink,rose
Important
Tailwind v4 setup depends on the @source entry above so Tailwind can scan classes used by this package.
Development
To get started with development:
- Clone the repository
- Install dependencies:
npm install - Start the development server:
npm run dev - Build the library:
npm run build - Run Storybook:
npm run storybook
