@agile-software/shared-components
v2.3.2
Published
Shared component library for frontend projects
Maintainers
Readme
Shared Components
A TypeScript-based React component library built with Material-UI Joy.
Installation
Install the package with npm:
npm install @agile-software/shared-componentsMigration
If you are upgrading from an older version of @agile-software/shared-components, please see the full Migration Guide.
Features
Custom Themes
The library provides two fixed theme creators based on our design tokens (colors, typography, fonts):
createCustomJoyTheme()→ for MUI JoycreateCustomMuiTheme()→ for MUI Material
⚠️ Important: These functions return fixed themes and do not accept configuration overrides.
Usage example:
import React from "react";
import {
createCustomJoyTheme,
createCustomMuiTheme,
} from "@agile-software/shared-components";
import { CssVarsProvider as JoyCssVarsProvider } from "@mui/joy/styles";
import { ThemeProvider } from "@mui/material/styles";
import { MATERIAL_THEME_ID } from "@mui/material/styles";
const joyTheme = createCustomJoyTheme();
const muiTheme = createCustomMuiTheme();
function App() {
return (
<ThemeProvider theme={{ [MATERIAL_THEME_ID]: muiTheme }}>
<JoyCssVarsProvider
theme={joyTheme}
defaultMode="light"
modeStorageKey="joy-mode"
colorSchemeStorageKey="joy-color-scheme"
>
{/* Your app content */}
</JoyCssVarsProvider>
</ThemeProvider>
);
}Available Components
⚠️ Note on Buttons: This library does not provide custom shared button components. Use the standard Joy UI
Buttonor Joy UIIconButtoninstead. Any styling requirements should be handled through the theme or joy API.
- Modal - Customizable modal dialog component with backdrop blur and drop shadow effects
- Accordion - Collapsible accordion component with multiple sections support
- SearchBar - Highly configurable search input with debouncing and advanced features
- Table - A comprehensive, feature-rich table component
- FileChip - Compact file display component with extension coloring, delete and download functionality
- Card - Highly configurable card
- Dropzone - Dropzone and file picker. Supports single and multiple files
Development
Scripts
npm run build- Build the library for productionnpm run build:watch- Build in watch mode for developmentnpm run dev- Alias for build:watchnpm run type-check- Run TypeScript type checkingnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errors
Adding New Components
- Create a new directory under
src/components/ - Add your component file (e.g.,
MyComponent.tsx) - Export from
src/index.ts - Update this README
Contributing
For contributing see the documentation: Contriution Guide Docusaurus
- Clone the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Support
If you encounter any problems reach out to Alexander Jablonowski (@EcoFreshKase) or Simon Dietrich (@py-bay).