Xola's React component library. It uses Tailwind CSS and serves the next generation of Xola apps.
This repository publishes two packages:
- @xola/ui-kit, the components.
- @xola/icons, the icon set.
Storybook is public at ui.xola.io. You can preview components and icons there.
- Requirements
- Installation
- Usage
- Configuration
- AI Prompt for Integration
- Development
- Local Package Linking
- Troubleshooting
- Deployment
- Node.js v16
- npm v7 or higher
This repo's master branch targets React 17. For React 18 or 19, use the next branch, or
install the package with the next tag:
npm install @xola/ui-kit@nextInstall the UI kit in your project:
npm install @xola/ui-kitInstall its peer dependencies:
npm install autoprefixer postcss tailwindcss lodash-
Create Tailwind and PostCSS config files that extend the UI kit's config.
echo 'module.exports = require("@xola/ui-kit/tailwind.config");' > tailwind.config.js echo 'module.exports = require("@xola/ui-kit/postcss.config");' > postcss.config.js
-
Import the UI kit's CSS in your app entry point.
import "@xola/ui-kit/index.css"; import "@xola/ui-kit/build/style.css";
-
Import and use a component.
import { Button } from "@xola/ui-kit";
The UI kit assumes your project already has a working React setup with PostCSS support.
npm v7 changed how it resolves peer dependencies. This repo sets legacy-peer-deps=true in
.npmrc to avoid peer dependency conflicts.
Apply the same setting in any project that consumes @xola/ui-kit. Copy this repo's .npmrc, or
pass the flag on every install:
npm install --legacy-peer-deps
npm install some-package --legacy-peer-depsPaste this prompt into an AI coding assistant (Claude Code, Cursor, etc.) working in the target
app's repo to wire up @xola/ui-kit end to end.
Integrate the @xola/ui-kit package into this project.
1. Check this project's installed React version (react entry in package.json / package-lock.json,
or `npm ls react`).
- React 17 (or no major-version conflict): install the default tag.
npm install @xola/ui-kit
- React 18 or 19: install the `next` tag instead, which targets React 18/19.
npm install @xola/ui-kit@next
Use whichever tag matches in every command below.
2. Install peer dependencies:
npm install autoprefixer postcss tailwindcss lodash
3. Add `legacy-peer-deps=true` to this project's .npmrc (create the file if missing).
@xola/ui-kit requires it to avoid npm v7+ peer dependency conflicts.
4. Create tailwind.config.js and postcss.config.js at the project root that extend the kit's config:
module.exports = require("@xola/ui-kit/tailwind.config");
module.exports = require("@xola/ui-kit/postcss.config");
If this project already has its own Tailwind/PostCSS config, merge instead of overwriting:
preserve existing content globs, theme extensions, and plugins, and spread the kit's config in
rather than replacing the file outright.
5. Import the kit's CSS in the app's entry point (before any of the app's own global styles):
import "@xola/ui-kit/index.css";
import "@xola/ui-kit/build/style.css";
6. Import components directly from the package, e.g.:
import { Button } from "@xola/ui-kit";
7. Verify: run the project's build/dev server and confirm it starts without errors and that an
imported component (e.g. Button) renders with its expected Tailwind styling.
Do not vendor or copy ui-kit source into this repo. Do not use Tailwind's default numbered color
classes when styling around ui-kit components; ui-kit ships with no dark mode support, so avoid
relying on it in this integration.
-
Use the pinned Node version.
nvm use
-
Install dependencies.
npm install
-
Start the Storybook dev server.
npm start
npm run lint # Check src for lint issues and auto-fix them
npm run lint:report # Same check, writes results to eslint_report.jsonUse an npm workspace to test local ui-kit changes against another project before you publish.
-
Place
ui-kitand your project in the same parent directory. -
In that parent directory, create a
package.json:{ "workspaces": ["ui-kit", "your-project"] } -
Copy
.npmrcand.nvmrcfromui-kitinto the parent directory.cp ui-kit/.npmrc . cp ui-kit/.nvmrc .
-
From the parent directory, install dependencies for both projects.
npm install
npm now links
your-project's@xola/ui-kitdependency to the localui-kitfolder. -
From
ui-kit, start the build in watch mode.cd ui-kit npm run build -- --watchChanges in
ui-kitnow appear inyour-project.
Changes in ui-kit don't show up in your-project. npm likely installed a separate copy in
your-project's node_modules. Remove it and let the workspace link take over again:
cd your-project
rm -rf node_modules/@xolaInstall fails or dependency state looks broken. Clear lockfiles and node_modules for both
projects, then reinstall:
cd workspace
rm -rf package-lock.json node_modules ui-kit/node_modules your-project/node_modules
npm install-
Install np, the release tool.
npm install -g np
-
Build and publish the package.
npm run build np <your-new-version> --tag=latest --yolo
-
Push the release tags to the upstream repo.
git push <upstream-remote> master --tags