@synergytek/react
v1.0.1
Published
Synergy React Component Library
Downloads
254
Maintainers
Readme
Synergy DMS Components
A React component library for Synergy Document Management System.
Installation
Install from npm:
npm install @synergytek/reactOr using yarn:
yarn add @synergytek/reactOr using pnpm:
pnpm add @synergytek/reactUsage
Import the global styles once in your application entry file (e.g., main.jsx or index.js):
import '@synergytek/react';This automatically imports all the necessary Tailwind CSS styles and configurations.
Importing Components
You can import components in several ways:
// Import from the main package (includes everything)
import { Button, DataGrid, Card, Loader } from '@synergytek/react';
// Or import from specific modules
import { Button, DataGrid } from '@synergytek/react/components';
import { useDebounce } from '@synergytek/react/hooks';
import { useUser, UserProvider } from '@synergytek/react/contexts';
import { cn, formatDate } from '@synergytek/react/utils';
import { RootLayout, Navbar } from '@synergytek/react/layouts';
function App() {
return (
<div>
<Button>Click me</Button>
<Card>
<h2>My Card</h2>
</Card>
</div>
);
}Available Components
Core Components
Button- Customizable button componentBreadcrumb- Navigation breadcrumbCard- Card containerColumns- Column layoutContextMenu- Context menu with triggerDataGrid- Data grid with AG GridDropdown- Dropdown componentLoader- Loading spinnerRadioGroup- Radio button groupSelect- Select dropdownSeparator- Visual separatorSlider- Slider inputTable- Table componentTemplate- Template componentText- Text componentToolbar- Toolbar componentIcon- Icon componentToaster- Toast notifications
Hooks
useDebounce- Debounce hookuseLocalStorage- Local storage hook
Contexts
useNavbar- Navbar context hookuseSidebar- Sidebar context hookuseUser- User context hookUserProvider- User context providerMenuProvider- Menu context providerSidebarProvider- Sidebar context providerNavbarProvider- Navbar context provider
Utilities
cn()- Class name merger (clsx + tailwind-merge)formatDate()- Date formatting utilitytype()- Type checking utilityflattenObject()- Object flattening utilitytoTitle()- Convert string to title case
Peer Dependencies
Make sure your project has these installed:
{
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^7.10.1"
}Styling
This library uses Tailwind CSS v4 and automatically handles all styling configuration.
No additional Tailwind CSS setup is required in your client project!
Simply import the package once in your entry file:
import '@synergytek/react';This will automatically:
- Import all necessary Tailwind CSS styles
- Configure the theme with custom color variables
- Set up dark mode support
- Include all component-specific styles
If your project already uses PostCSS, the package will work seamlessly. If not, you may need to add PostCSS to your build configuration:
// postcss.config.js (optional, only if not already configured)
module.exports = {
plugins: {
'@tailwindcss/postcss': {},
},
}Versioning
This library follows Semantic Versioning.
To install a specific version:
npm install @synergytek/[email protected]To update to the latest version:
npm update @synergytek/reactVersion History
v1.0.3- Optimized import structure, automatic Tailwind CSSv1.0.2- Package improvementsv1.0.0- Initial release
See CHANGELOG.md for detailed version history.
Documentation
- INSTALLATION.md - Detailed installation instructions
- CHANGELOG.md - Version history and changes
Development
This is a source-only library. Consuming applications import the source files directly.
License
MIT
Contributing
Please ensure all components follow the established patterns and include proper prop-types or TypeScript definitions.
