create-ng-tailwind
v3.1.0
Published
๐ A CLI tool to give starter template for angular project with tailwind css
Downloads
379
Maintainers
Readme
Create Angular + Tailwind
๐ A CLI tool to give starter template for angular project with tailwind css
โจ Features
- ๐ฏ Angular 20+ - Latest version with standalone components and signals
- ๐จ Tailwind CSS v4 - Utility-first CSS framework preconfigured
- ๐ SEO Optimized - Meta tags, Open Graph, Twitter Cards, structured data, robots.txt
- ๐ i18n Translation - English & Arabic with RTL support
- ๐ฎ Interactive UI - Toast notifications, Modal dialogs, and components
- ๐๏ธ Zero Configuration - Everything set up and ready to go
Quick Start
Using npx (Recommended)
Run the following command and follow the prompts:
npx create-ng-tailwind my-awesome-appUsing npm
Install globally and use:
npm install -g create-ng-tailwind
create-ng-tailwind my-awesome-appWhat happens next?
The CLI will guide you through:
- Choosing a template (Minimal or Starter)
- Configuring Server-Side Rendering (optional)
- Setting up zoneless application (optional)
- Selecting AI tools integration (optional)
After setup completes:
cd my-awesome-app
npm install
ng serveYour app will be running at http://localhost:4200 ๐
๐๏ธ Project Structure
my-app/
โโโ src/
โ โโโ app/
โ โ โโโ core/ # Core services and interceptors
โ โ โ โโโ services/ # Auth, API, SEO, Toast, Modal, etc.
โ โ โ โโโ interceptors/ # HTTP interceptors
โ โ โ โโโ guards/ # Route guards
โ โ โ โโโ i18n/ # Translation service
โ โ โ โโโ utils/ # Structured data utilities
โ โ โโโ shared/ # Shared components and utilities
โ โ โ โโโ components/ # Button, Card, Toast, Modal
โ โ โ โโโ pipes/ # Truncate, TimeAgo
โ โ โ โโโ directives/ # ClickOutside, Tooltip
โ โ โ โโโ models/ # TypeScript interfaces
โ โ โโโ features/ # Feature modules
โ โ โ โโโ home/ # Home page
โ โ โ โโโ about/ # About page
โ โ โ โโโ contact/ # Contact page
โ โ โ โโโ auth/ # Authentication pages
โ โ โโโ layout/ # Layout components
โ โ โ โโโ header/ # Navigation header
โ โ โ โโโ footer/ # Footer component
โ โ โโโ app.config.ts # App configuration
โ โ โโโ app.routes.ts # Routing configuration
โ โ โโโ app.ts # Main app component
โ โโโ styles.css # Tailwind CSS imports
โ โโโ main.ts # Bootstrap
โโโ public/
โ โโโ assets/
โ โ โโโ i18n/ # Translation files (en.json, ar.json)
โ โ โโโ images/ # OG images, logos
โ โโโ robots.txt # SEO robots file
โ โโโ favicon.svg # Favicon
โ โโโ android-chrome-*.svg # PWA icons
โโโ .postcssrc.json # PostCSS configuration
โโโ package.json
โโโ ...๐ฏ Starter Template Features
The Starter Template includes 25+ production-ready features:
Core Services
- AuthService - Authentication & user management
- ApiService - Centralized HTTP request handling
- SeoService - Comprehensive SEO management (meta tags, Open Graph, Twitter Cards, structured data)
- ToastService - Notification system (success, error, warning, info)
- ModalService - Dialog system with confirm & alert
- LoadingService - Global loading state with signals
- CacheService - Response caching with TTL
- StorageService - LocalStorage wrapper with type safety
- i18nService - Internationalization management
SEO Optimization (Simple & Ready to Use)
- SEO Service - Just 2 methods:
updateMeta()andaddStructuredData() - Meta Tags - Title, description, keywords (auto-configured on all pages)
- Social Sharing - Open Graph & Twitter Cards (pre-configured)
- Structured Data - Organization & WebSite schemas (included)
- Canonical URLs - Auto-updated on route changes
- Assets - robots.txt, favicon set, OG image placeholder
- Extensible - Easy to add more schemas as needed
UI Components
- ButtonComponent - Variants: primary, secondary, danger
- CardComponent - Flexible container with title & shadow
- LoadingSpinnerComponent - Animated loading indicator
- ToastComponent - Auto-dismiss notifications
- ModalComponent - Accessible dialog with sizes
Utilities
- Pipes - Truncate, TimeAgo
- Directives - ClickOutside, Tooltip
- HTTP Interceptors - Auth, Error handling, Loading, Caching
- TypeScript Path Aliases - Clean imports with
@core/*,@shared/*,@features/*
Internationalization
- Complete i18n Support - English & Arabic with RTL support
- Language Switcher - Built-in header component
- Translation Files - JSON-based translation system
Additional Features
- Routing - Pre-configured with lazy loading
- Authentication Pages - Login, Register, Forgot Password
- Example Pages - Home, About, Contact with reactive forms
- PWA Support - Service worker configuration
- Linting & Formatting - ESLint + Prettier + simple-git-hooks (pre-commit linting)
- Modern Stack - Tailwind v4, TypeScript, Signals
๐จ Tailwind CSS v4
This tool uses Tailwind CSS v4 with the official PostCSS approach:
- โ
Modern PostCSS Plugin -
@tailwindcss/postcss - โก LightningCSS - Fast CSS processing
- ๐จ Modern CSS Features - Nesting, variables, and more built-in
- ๐ Simplified Build - No preprocessors needed
Note: Tailwind v4 does not support SCSS, Sass, or Less. Modern CSS provides all the features you need!
๐จ Comprehensive Theming System
The starter template includes a powerful Tailwind v4 theming system using the @theme directive:
Theme Colors:
primary- Main brand color (with full 50-950 scale)secondary- Secondary brand color (with full 50-950 scale)accent- Accent/highlight color (with full 50-950 scale)success- Success states (green)danger- Error/danger states (red)warning- Warning states (yellow/orange)info- Informational states (blue)
Customization:
Simply edit src/styles.css and change the color values in the @theme block. All components automatically update!
@theme {
--color-primary-500: #3b82f6; /* Change this to your brand color */
--color-secondary-500: #06b6d4;
--color-accent-500: #a855f7;
/* ... complete color scales included */
}Usage in templates:
<div class="bg-primary-600 text-white">Primary button</div>
<div class="bg-secondary-500">Secondary element</div>
<p class="text-danger-600">Error message</p>All UI components, pages, and layouts use these theme colors, making it easy to rebrand your entire application by changing a few color values!
๐ License
MIT License - see the LICENSE file included in the package.
๐ Support & Community
If you find this tool helpful, please consider:
- โญ Star the package on npm
- ๐ Share with your developer friends
- ๐ง Contact: [email protected]

