@batoanng/mui-components
Typed MUI primitives, atomic UI building blocks, and a shared theme system for product teams.
Quick install
npm install @batoanng/mui-componentsWrap your app with the shared theme
The package exports both theme primitives and ready-to-use components for immediate adoption.
Context
What It Covers
Ship consistent interfaces faster with a shared component library, bundled theme tokens, test utilities, and form-ready building blocks.
- Built on MUI v5
- Organized by Atomic Design (Atoms, Molecules, Forms)
- Theming support (Light/Dark mode, tokenized palette, typography)
- Custom hooks and utilities
⨠Features
- Built on MUI v5
- Organized by Atomic Design (Atoms, Molecules, Forms)
- Theming support (Light/Dark mode, tokenized palette, typography)
- Custom hooks and utilities
- Ready-to-use with
ThemeProviderandCssBaseline - Developer tooling: Storybook, Vitest, ESLint, Prettier
- Published on npm and deployed Storybook: mui-components-batoanng.vercel.app
Setup
Installation
Bring the package into your project with the published npm entrypoint.
npm install @batoanng/mui-components
š¦ Installation
npm install @batoanng/mui-components
You must also install peer dependencies if not already present:
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
Start
Wrap your app with the shared theme
The package exports both theme primitives and ready-to-use components for immediate adoption.
import { CssBaseline, ThemeProvider } from '@mui/material';
import { Button, defaultTheme } from '@batoanng/mui-components';
export function App() {
return (
<ThemeProvider theme={defaultTheme}>
<CssBaseline />
<Button variant="contained">Launch</Button>
</ThemeProvider>
);
}
š Quick Start
Wrap your application with the theme provider:
import { CssBaseline, ThemeProvider } from '@mui/material';
import { defaultTheme } from '@batoanng/mui-components';
export default function App() {
return (
<ThemeProvider theme={defaultTheme}>
<CssBaseline />
{/* Your app components */}
</ThemeProvider>
);
}
Use components:
import { Button } from '@batoanng/mui-components';
<Button variant="contained">Click me</Button>
Surface
Exports And Entrypoints
Entrypoints
- main:
./dist/components.js - types:
./dist/src/index.d.ts
Key files
.storybookeslint.config.mjsnodemon.jsonpackage.jsonprettier.config.cjssrc/tsconfig.build.json
Integration
Integration Notes
Peer dependencies
@emotion/react@emotion/styled@mui/icons-material@mui/material@mui/utils@mui/x-date-pickersframer-motionreactreact-domreact-dropzonereact-hook-formreact-idle-timer
Internal workspace links
@batoanng/utils@batoanng/eslint-config@batoanng/prettier-config@batoanng/tsconfig@batoanng/vite-config
Ops
Development Notes
Latest release snapshot
3.5.4
Patch Changes
- Replace published
workspace:*development dependency ranges with npm semver ranges. - Updated dependencies
- @batoanng/utils@2.4.2
š§© Components Structure
src/
āāā components/
ā āāā atoms/ # Base building blocks (e.g., Button, Label)
ā āāā molecules/ # Compound components (e.g., IdleTimer)
ā āāā form/ # Input controls and validation-aware forms (integrated with react-hook-form)
ā āāā index.ts # Entry point for all component exports
All components are re-exported via @batoanng/mui-components:
import { FormTextField } from '@batoanng/mui-components';
š§° Development
Common commands:
pnpm dev # Start Storybook
pnpm test # Run unit tests with Vitest
pnpm lint # Run ESLint
pnpm format # Format with Prettier
pnpm build # Build library output
Linting is configured through the local flat config entrypoint at eslint.config.mjs, which composes:
@batoanng/eslint-config@batoanng/eslint-config/typed@batoanng/eslint-config/test
š Storybook
View the full component library online:
š https://mui-components-batoanng.vercel.app/
To run locally:
pnpm dev
Source docs
Reference
The full README is rendered below so the package guide stays detailed and traceable to the source docs that live with the package itself.
A fully typed, themeable, and accessible component library built with React, TypeScript, and Material UI (MUI). It follows atomic design principles and ships with a complete theming system, hooks, test utilities, and form support to accelerate UI development across multiple projects.
⨠Features
- Built on MUI v5
- Organized by Atomic Design (Atoms, Molecules, Forms)
- Theming support (Light/Dark mode, tokenized palette, typography)
- Custom hooks and utilities
- Ready-to-use with
ThemeProviderandCssBaseline - Developer tooling: Storybook, Vitest, ESLint, Prettier
- Published on npm and deployed Storybook: mui-components-batoanng.vercel.app
š¦ Installation
npm install @batoanng/mui-components
You must also install peer dependencies if not already present:
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
š Quick Start
Wrap your application with the theme provider:
import { CssBaseline, ThemeProvider } from '@mui/material';
import { defaultTheme } from '@batoanng/mui-components';
export default function App() {
return (
<ThemeProvider theme={defaultTheme}>
<CssBaseline />
{/* Your app components */}
</ThemeProvider>
);
}
Use components:
import { Button } from '@batoanng/mui-components';
<Button variant="contained">Click me</Button>
š§© Components Structure
src/
āāā components/
ā āāā atoms/ # Base building blocks (e.g., Button, Label)
ā āāā molecules/ # Compound components (e.g., IdleTimer)
ā āāā form/ # Input controls and validation-aware forms (integrated with react-hook-form)
ā āāā index.ts # Entry point for all component exports
All components are re-exported via @batoanng/mui-components:
import { FormTextField } from '@batoanng/mui-components';
šØ Theming System
Located in src/theme/, it includes:
- Light and Dark theme create function
- Custom spacing, radii, shadows, typography
- Color palette consistent with brand/UI tokens
Usage:
import { defaultTheme, createDefaultTheme } from '@batoanng/mui-components';
const lightTheme = createDefaultTheme({}); // Light theme is default
const darkTheme = createDefaultTheme({ darkTheme: true });
<ThemeProvider theme={lightTheme}>...</ThemeProvider>
<ThemeProvider theme={darkTheme}>...</ThemeProvider>
š§° Development
Common commands:
pnpm dev # Start Storybook
pnpm test # Run unit tests with Vitest
pnpm lint # Run ESLint
pnpm format # Format with Prettier
pnpm build # Build library output
Linting is configured through the local flat config entrypoint at eslint.config.mjs, which composes:
@batoanng/eslint-config@batoanng/eslint-config/typed@batoanng/eslint-config/test
š Storybook
View the full component library online:
š https://mui-components-batoanng.vercel.app/
To run locally:
pnpm dev