A React and TypeScript component library focused on complex workspace UI components.
Explore the interactive component playground and API documentation: Chromatic Storybook Demo
- Dual Output: Bundled in both ES Modules (index.js) and CommonJS (index.cjs) formats.
- TypeScript Support: Native, auto-generated type declarations.
- Vanilla CSS Styling: Zero-dependency styling for maximum performance and control.
- Robust Testing: Verified using Vitest and Storybook Test runners.
- Visual Documentation: Fully interactive playground using Storybook.
- Automated Publishing: Versioned and published via Changesets and GitHub Actions.
Install the package via your preferred package manager:
npm install @paras.in/puiImport the CSS file in your main application entry point (e.g., main.tsx or App.tsx):
import "@paras.in/pui/style.css";Here is an example of implementing the FileExplorer component:
import React, { useState } from "react";
import { FileExplorer, type FileExplorerItem } from "@paras.in/pui";
const App = () => {
const [items, setItems] = useState<FileExplorerItem[]>([]);
return (
<div style={{ width: "300px", height: "100vh" }}>
<FileExplorer items={items} onItemsChange={setItems} />
</div>
);
};
export default App;npm installLaunch the interactive Storybook playground:
npm run storybookExecute unit tests using Vitest:
npm run testBuild ESM and CommonJS bundles and generate type definitions:
npm run buildThis repository uses Changesets to automate versioning and publishing.
- Create a feature branch:
git checkout -b feature/your-feature
- Write your code and tests.
- Before opening or merging a Pull Request, run the changeset command:
npm run changeset
- Follow the interactive prompts to select the version bump type (major, minor, or patch) and write a summary of the change.
- Commit the generated changeset file and merge it into main.