Skip to main content

Install

1

Install the package

npm install ailita-library
This installs the library and all of its bundled dependencies. Peer dependencies React 18+ and react-dom 18+ must already be present in your project.
2

Add styles

Choose how to include the compiled Tailwind CSS from the library.
3

Configure for Next.js (App Router only)

// next.config.js
const nextConfig = {
  transpilePackages: ['ailita-library'],
}
export default nextConfig
Skip this step for Vite or Create React App. Only required for Next.js App Router.

Peer dependencies

The library requires the following peer dependencies to be installed in your project:
PackageRequired version
react>=18
react-dom>=18
The library bundles axios, react-hook-form, @hookform/resolvers, and zod as dependencies — you do not need to install them separately.

What gets installed

Build output in dist/:
  • index.js — ESM module
  • index.cjs — CommonJS module
  • index.d.ts / index.d.cts — TypeScript types
  • ailita-library.css — compiled Tailwind styles (imported via ailita-library/styles)

Next steps

Configure AilitaProvider

Wrap your app and connect to your tenant.