chai-tailwind-css-engine
v1.0.2
Published
A lightweight utility-first CSS engine
Downloads
317
Maintainers
Readme
☕ Chai Tailwind CSS Engine
A lightweight utility-first CSS engine inspired by Tailwind CSS.
It scans your DOM for chai-* classes and dynamically converts them into inline styles.
Install
npm install chai-tailwind-css-engineImport
import "chai-tailwind-css-engine";Usage
<div class="chai-p-20 chai-bg-blue chai-text-white chai-br-12">
Hello ChaiCSS
</div>Supported Utilities
Spacing
chai-p-20
chai-m-10Background Colors
chai-bg-red
chai-bg-blue
chai-bg-greenText Colors
chai-text-white
chai-text-black
chai-text-yellowBorder Radius
chai-br-20Font Size
chai-fs-30How It Works
- Scans DOM after page load
- Detects classes starting with
chai-* - Parses utility + value
- Converts to inline styles
- Applies styles dynamically
Example
<div class="chai-p-40 chai-bg-purple chai-text-white chai-br-16 chai-fs-24">
ChaiCSS Working 🚀
</div>Playground
Interactive docs available in the project docs folder.
Run locally:
npm run docsAuthor
Saksham Agrawal
License
MIT
