A modern, standardized React UI component library built with Tailwind CSS and TypeScript, managed as a monorepo.
This project is organized as a monorepo using pnpm workspaces:
packages/ui: The core component library.- Built with React, Tailwind CSS, and Vite (Library Mode).
- Exports ESM and UMD bundles + Type definitions.
- Fully typed with TypeScript.
packages/playbook: Documentation and component showcase application.- Interactive playground to view and test components.
- Built with Vite and React.
- Node.js (v22+ recommended)
- pnpm (v22+)
-
Clone the repository:
git clone git@github.com:shawon-kanji/core-ui.git cd core-ui -
Install dependencies:
pnpm install
To build the core-ui package:
pnpm --filter core-ui build
# or from the root to build everything
pnpm buildTo start the documentation/playground app:
pnpm --filter playbook devOpen http://localhost:5173 to view the playbook.
To use core-ui in another project (once published):
-
Install the package:
npm install @shawonkanji/core-ui # or yarn add @shawonkanji/core-ui -
Import the CSS in your root file (e.g.,
main.tsxorApp.tsx):import '@shawonkanji/core-ui/dist/style.css';
-
Import and use components:
import { Button } from '@shawonkanji/core-ui'; function App() { return <Button variant="primary">Click Me</Button>; }
If you need to customize the theme or scan core-ui classes in your consuming application's Tailwind config:
// tailwind.config.js
module.exports = {
content: [
// ...
"./node_modules/@shawonkanji/core-ui/dist/**/*.{js,mjs}",
],
// ...
}The library currently includes:
- Alert
- Avatar
- Badge
- Box
- Button
- Card
- Divider
- Input
- Skeleton
- Spinner
- Stack
- Typography
MIT