Skip to content

epam/ai-dial-ui-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

AI DIAL UI Kit

AI-DIAL-UI-KIT project logo

The AI DIAL UI Kit is an production-ready React component library designed to streamline your development process. It features a collection of base components, such as Buttons, Inputs, Dropdowns, and more β€” allowing you to effortlessly reuse elements, quick and easy.

npm version License: Apache 2.0 TypeScript React

Table of Contents

✨ Highlights

  • 🎨 Unified User Experience: Ui Kit usage helps with design consistency across AI DIAL applications
  • ⚑ Modern Stack: Built with latest React, TypeScript, Vite, and Tailwind CSS
  • 🎨 Highly Customizable: Deep theming capabilities with CSS custom properties
  • πŸ§ͺ Well-Tested: Comprehensive test coverage (70%+) with Vitest and React Testing Library
  • πŸ“š Storybook Ready: Includes interactive component documentation and development playground
  • πŸ› οΈ Developer Experience: Leverage ESLint, Prettier, Husky for maintainable code quality
  • πŸ“¦ Distribution Ready: Deployed as NPM package ready for easy integration

πŸ“– Documentation

Explore our components and their usage in our interactive Storybook documentation.

πŸš€ Quick Start

Prerequisites

  • Node.js >= 22.2.0
  • npm >= 10.7.0

Installation

npm install @epam/ai-dial-ui-kit

Basic Usage

import { DialButton } from '@epam/ai-dial-ui-kit';
import '@epam/ai-dial-ui-kit/styles.css';

function App() {
  return (
    <div>
      <DialButton
        label="Click me"
        variant={ButtonVariant.Primary}
        onClick={() => console.log("Next.js + AI DIAL UI Kit!")}
      />
    </div>
  );
}

Development

Prerequisites

  • Node.js >= 22.2.0
  • npm >= 10.7.0
  • Git

Development Setup

  1. Clone the repo

    git clone https://github.com/epam/ai-dial-ui-kit.git
    cd ai-dial-ui-kit
  2. Install Dependencies

    npm install
  3. Start Development Environment

    # Start Storybook for component development
    npm run storybook
    
    # Run tests in watch mode
    npm run test -- --watch
    
    # Start Vite dev server
    npm run dev

Running Tests

# Run all tests with coverage
npm run test

Project Structure

src/
β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ Button/         # Example component
β”‚   β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”‚   β”œβ”€β”€ Button.spec.tsx
β”‚   β”‚   └── Button.stories.tsx
β”‚   └── ...
β”œβ”€β”€ styles/             # Global styles and Tailwind configuration
β”‚   β”œβ”€β”€ buttons.scss
β”‚   β”œβ”€β”€ typography.scss
β”‚   └── tailwind-entry.scss
β”œβ”€β”€ types/              # TypeScript type definitions
└── index.ts            # Main entry point

🎨 Theming & Customization

The library uses CSS custom properties for comprehensive theming. Override these variables to match your brand:

:root {
  /* Background layers */
  --bg-layer-0: #000000;
  --bg-layer-1: #090D13;
  --bg-layer-2: #171B21;
  
  /* Text colors */
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
   ...
}

Full list of variables is available here

πŸ“– Storybook

Storybook is a handy library for documenting and developing of UI components.

Stories

To run fully interactive storybook:

Development mode

npm run storybook
# Open http://localhost:6006

Production Build

npm run build-storybook

Production start

npx http-server ./storybook-static
# Open http://127.0.0.1:8080/

Documents

To run documents only:

Development mode

npm run storybook-docs
# Open http://localhost:54800/

Production build

npm run build-storybook-docs

Production start

npx http-server ./storybook-static
# Open http://127.0.0.1:8080/

Storybook provides:

  • πŸ“– Interactive component documentation
  • 🎨 Visual testing playground
  • β™Ώ Accessibility testing tools
  • πŸ“± Responsive design testing
  • 🎯 Component isolation

πŸš€ Usage in Projects

Next.js Integration
  1. Install the package and peer dependencies that are not currently in your project
npm install @epam/ai-dial-ui-kit
npm install react react-dom  @tabler/icons-react classnames
npm install @floating-ui/react monaco-editor @monaco-editor/react
  1. Import style in the root layout of the project:
// app/layout.tsx
import "@epam/ai-dial-ui-kit/styles.css";
  1. Usage example
// app/page.tsx
"use client";
import { DialButton } from "@epam/ai-dial-ui-kit";

export default function Home() {
  return (
    <div className="w-full h-full flex flex-col gap-3 items-center justify-center">
      <h1>Test library</h1>
      <DialButton
        onClick={() => console.log("Next.js + AI DIAL UI Kit!")}
        label="Click me"
        className="dial-primary-button"
      />
    </div>
  );
}

Tree Shaking

Import only the components you need:

// βœ… Good - Tree shakable imports
import { DialButton, DialInput } from '@epam/ai-dial-ui-kit';
import '@epam/ai-dial-ui-kit/styles.css'; // Import styles separately

// ❌ Avoid - Imports entire library
import * as UIKit from '@epam/ai-dial-ui-kit';

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Code style guidelines
  • Testing requirements
  • Pull request process

πŸ”’ Security

If you discover a security vulnerability, please refer to our Security Policy.

πŸ“„ License

Apache 2.0 - see the LICENSE file for details.

🌟 Related Projects

  • AI-DIAL - Entrypoint for all AI Dial projects

Made with ❀️ by EPAM Systems

About

A modern UI kit for building AI DIAL interfaces with React

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors 13

Languages