All packages/@batoanng/mui-components
Components

@batoanng/mui-components

Typed MUI primitives, atomic UI building blocks, and a shared theme system for product teams.

Version 3.5.42 min read12 peer deps2 entrypoints

Quick install

npm install @batoanng/mui-components

Wrap 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 ThemeProvider and CssBaseline
  • 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

  • .storybook
  • eslint.config.mjs
  • nodemon.json
  • package.json
  • prettier.config.cjs
  • src/
  • tsconfig.build.json

Integration

Integration Notes

Peer dependencies

  • @emotion/react
  • @emotion/styled
  • @mui/icons-material
  • @mui/material
  • @mui/utils
  • @mui/x-date-pickers
  • framer-motion
  • react
  • react-dom
  • react-dropzone
  • react-hook-form
  • react-idle-timer
  • @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.

npm version install size Storybook

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 ThemeProvider and CssBaseline
  • 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