vj-ui-kit-lib
v1.0.0
Published
A customizable React component library built on Material-UI
Maintainers
Readme
UI-Kit
A customizable React component library built on Material-UI (MUI) with Storybook integration.
Features
- Built on Material-UI components
- Customizable theming system
- TypeScript support
- Storybook documentation
- Tree-shakeable
- Modern development setup with Vite
Installation
npm install ui-kit
# or
yarn add ui-kitUsage
Basic Setup
import { ThemeProvider } from '@mui/material/styles';
import { CustomButton, defaultTheme } from 'ui-kit';
function App() {
return (
<ThemeProvider theme={defaultTheme}>
<CustomButton variant="contained" color="primary">
Click me
</CustomButton>
</ThemeProvider>
);
}Custom Theme
import { ThemeProvider } from '@mui/material/styles';
import { createCustomTheme } from 'ui-kit';
const customTheme = createCustomTheme({
palette: {
primary: {
main: '#FF0000',
},
},
custom: {
borderRadius: {
medium: '16px',
},
},
});
function App() {
return (
<ThemeProvider theme={customTheme}>
{/* Your components */}
</ThemeProvider>
);
}Development
Prerequisites
- Node.js 16+
- npm or yarn
Setup
- Clone the repository
- Install dependencies:
npm install # or yarn
Available Scripts
npm start- Start Storybook development servernpm run build- Build the librarynpm run build:storybook- Build Storybook static sitenpm test- Run testsnpm run lint- Run ESLintnpm run format- Format code with Prettier
Adding New Components
- Create a new component in
src/components - Create a story file with
.stories.tsxextension - Export the component in
src/index.ts - Document the component in Storybook
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT
