Skip to content

Installation

Via CDN

The simplest install: a single tag, no build step.

<script src="https://unpkg.com/@developedbysaad/chaitailwind"></script>

After DOMContentLoaded, the engine self-starts and scans the entire document body. To pin a version:

<script src="https://unpkg.com/@developedbysaad/[email protected]/src/chai.js"></script>

Via npm

Terminal window
npm install @developedbysaad/chaitailwind
// Auto-init (recommended for browser apps)
import 'chaitailwind';
// Or grab the API explicitly
import { Chai, chai, theme } from 'chaitailwind';

The package exposes both ESM (import) and CommonJS (require) entry points and ships no dependencies.

Self-hosted

The library is a single file with no build step. Drop src/chai.js into your project’s static directory and reference it:

<script src="/assets/chai.js"></script>

This is what the docs site you’re reading does — open the network tab and look for chai.js.

Verifying the install

Open the console and run:

window.chai.parse('chai-p-4')
// → { padding: '4px' }

If you get an object back, you’re done.

Made by Saad · @developedbysaad on X