GitHub - UiPath/uipath-ui-widgets: A collection of reusable React UI widgets for building UiPath-powered applications, built with uipath-typescript and apollo-wind.

UiPath UI Widgets

Test Build & Deploy Coverage License: MIT TypeScript React Storybook

A collection of reusable React UI components for UiPath applications.

๐Ÿ“ฆ Packages

@uipath/ui-widgets-datatable

A powerful and flexible datatable component with full CRUD support, master-detail views, inline editing, and more.

Features:

  • โœ… Full CRUD operations (Create, Read, Update, Delete)
  • ๐Ÿ“Š Master-detail view with grouping
  • โœ๏ธ Inline editing with multiple field types
  • ๐Ÿ” Filtering, sorting, and pagination
  • ๐ŸŽจ Customizable columns and styling
  • ๐Ÿ”— Foreign key relationship support
  • ๐Ÿ“ Diff viewer for change review
  • โœ… Comprehensive test coverage

@uipath/ui-widgets-multi-file-upload

A multi-file upload component that allows users to select and upload multiple files to a UiPath bucket.

Features:

  • ๐Ÿ“ Multiple file selection
  • โ˜๏ธ Upload to UiPath buckets
  • โœ… Success/error callbacks
  • ๐Ÿ” File type filtering
  • ๐Ÿ“ File size limits
  • ๐Ÿ“‚ Custom path support

๐Ÿš€ Getting Started

Installation

Development

# Start development server
npm run dev

# Build all packages
npm run build

# Run linter
npm run lint

# Start Storybook
npm run storybook

# Build Storybook
npm run build-storybook

Testing

# Run all tests
npm test

# Run tests in watch mode
npm test -- --watch

# Run tests with UI
npm run test:ui

# Generate coverage report
npm run test:coverage

See TEST_GUIDE.md for comprehensive testing documentation.

๐Ÿ“š Storybook

This project uses Storybook for component documentation and development. Storybook provides an interactive UI for viewing and testing components in isolation.

Running Storybook Locally

This will start Storybook on http://localhost:6006.

Building Storybook

This creates a static build of Storybook in the storybook-static directory.

Deployment

Storybook is automatically deployed to GitHub Pages when changes are pushed to the main or develop branches. The deployment workflow builds both the packages and Storybook, then publishes the static Storybook site.

To enable GitHub Pages deployment:

  1. Go to your repository settings
  2. Navigate to Pages
  3. Set Source to "GitHub Actions"

๐Ÿ“ Project Structure

uipath-ui-widgets/
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ datatable/          # DataTable component package
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ components/ # React components
โ”‚       โ”‚   โ”œโ”€โ”€ hooks/      # Custom React hooks
โ”‚       โ”‚   โ”œโ”€โ”€ utils/      # Utility functions
โ”‚       โ”‚   โ””โ”€โ”€ types.ts    # TypeScript types
โ”‚       โ””โ”€โ”€ package.json
โ”œโ”€โ”€ samples/                # Sample applications
โ”œโ”€โ”€ test/                   # Test setup and utilities
โ”‚   โ”œโ”€โ”€ setup.ts           # Test configuration
โ”‚   โ””โ”€โ”€ utils/             # Test helpers
โ”œโ”€โ”€ vitest.config.ts       # Vitest configuration
โ””โ”€โ”€ package.json

๐Ÿงช Testing

This project follows testing best practices with comprehensive unit test coverage:

  • Test Framework: Vitest
  • Testing Library: React Testing Library
  • Coverage Target: 80%+ for statements, branches, functions, and lines

Key testing principles:

  • โœ… Test behavior, not implementation
  • โœ… Use accessible queries
  • โœ… Follow AAA pattern (Arrange-Act-Assert)
  • โœ… Mock external dependencies
  • โœ… Test edge cases and error states

๐Ÿ› ๏ธ Tech Stack

  • React 19 - UI library
  • TypeScript - Type safety
  • Vite - Build tool
  • ag-Grid - Data grid component
  • Material-UI - UI components
  • Vitest - Test runner
  • React Testing Library - Component testing

React Compiler

The React Compiler is enabled on this project. See React Compiler documentation for more information.

Note: This will impact Vite dev & build performances.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(["dist"]),
  {
    files: ["**/*.{ts,tsx}"],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ["./tsconfig.node.json", "./tsconfig.app.json"],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
]);

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from "eslint-plugin-react-x";
import reactDom from "eslint-plugin-react-dom";

export default defineConfig([
  globalIgnores(["dist"]),
  {
    files: ["**/*.{ts,tsx}"],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs["recommended-typescript"],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ["./tsconfig.node.json", "./tsconfig.app.json"],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
]);