@eintrek/erp-theme
v1.4.16
Published
A shadcn/ui component library with Storybook
Maintainers
Readme
ERP Theme - shadcn/ui Component Library
A beautiful and reusable component library built with shadcn/ui, TypeScript, TailwindCSS, and Storybook.
Features
- 🎨 Beautiful components based on shadcn/ui
- 📚 Storybook for component documentation and testing
- 🔧 TypeScript support
- 🎯 TailwindCSS for styling
- 📦 Ready to be packaged and used in Next.js projects
- 🌙 Dark mode support
- ♿ Accessibility-first design
Getting Started
Installation
npm installDevelopment
Start Storybook development server:
npm run storybookBuild the library:
npm run buildBuild Storybook for production:
npm run build-storybookUsage in Next.js Project
- Install the package in your Next.js project:
npm install erp-theme- Import TailwindCSS configuration in your
tailwind.config.js:
import type { Config } from "tailwindcss";
import erpThemeConfig from "erp-theme/tailwind.config";
const config: Config = {
...erpThemeConfig,
content: [
// your existing content paths
"./node_modules/erp-theme/dist/**/*.{js,ts,jsx,tsx}",
...erpThemeConfig.content,
],
};
export default config;- Import the CSS variables in your global CSS:
@import "erp-theme/dist/globals.css";- Use the components:
import { Button, Card, CardContent, CardHeader, CardTitle } from "erp-theme";
export default function MyPage() {
return (
<Card>
<CardHeader>
<CardTitle>Hello World</CardTitle>
</CardHeader>
<CardContent>
<Button>Click me</Button>
</CardContent>
</Card>
);
}Components
- Button - Versatile button component with multiple variants
- Card - Card container with header, content, and footer sections
More components coming soon!
Development
Project Structure
src/
├── components/
│ └── ui/
│ ├── button.tsx
│ ├── button.stories.tsx
│ ├── card.tsx
│ └── card.stories.tsx
├── lib/
│ └── utils.ts
└── index.tsAdding New Components
- Create the component in
src/components/ui/ - Create corresponding stories in the same directory
- Export the component from
src/index.ts - Update this README
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
