shadcn-rtl
v0.0.52
Published
A simple TypeScript script to convert your **ShadCN** components to **RTL-ready** by transforming Tailwind CSS class names.
Readme
shadcn-rtl
A CLI tool to convert your ShadCN components to RTL-ready by transforming Tailwind CSS class names.
🚀 Installation & Usage
Quick Start (Recommended)
npm i shadcn-rtlThis will process components in the default location: src/components
Custom Path
npx shadcn-rtl --path=./components
npx shadcn-rtl --path=src/ui
npx shadcn-rtl --path=/absolute/path/to/components📦 Install Locally (Optional)
If you plan to use this tool frequently, you can install it globally:
npm install -g shadcn-rtlThen use it directly:
shadcn-rtl
shadcn-rtl --path=./my-components✅ What It Does
Replaces LTR Tailwind classes with their RTL counterparts:
| LTR Class | RTL Class |
|-----------|-----------|
| pl- | ps- |
| pr- | pe- |
| ml- | ms- |
| mr- | me- |
| text-left | text-start |
| rounded-l- | rounded-s- |
| border-l- | border-s- |
| And many more... | |
🔧 Development
Build
npm run buildRun Locally
npm start