Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ng-zen/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

@ng-zen/cli
Generate production-ready, customizable Angular UI components directly into your project π
Stop wrestling with rigid UI libraries. @ng-zen/cli generates beautiful, modern Angular components as source code in your project, giving you complete control and ownership.
π― Why Choose @ng-zen/cli?
β¨ Own Your Components
Unlike traditional UI libraries that give you <library-button>
black boxes, @ng-zen generates actual TypeScript, HTML, and SCSS files directly into your project. You own the code, you control the future.
ποΈ Instant Productivity
- Production-Ready Components: Avatar, Button, Checkbox, Divider, Form Control, Icon, Input, Skeleton, Switch, Textarea
- Zero Configuration: Works with Angular 20+ out of the box
- Complete Setup: Each component includes unit tests, Storybook stories, and documentation
π¨ Built for Customization
- CSS Variables: Easy theming without touching component internals
- Editable SCSS: Modify styles directly when you need deeper customization
- Modern Architecture: Standalone components, OnPush change detection, Angular signals
π Developer Experience First
- Interactive Documentation: Live Storybook examples for every component
- TypeScript Ready: Full type safety and IntelliSense support
- Test Coverage: Generated components include comprehensive unit tests
- JSDoc Annotations: Detailed inline documentation
Table of Contents
- Quick Start
- Installation
- Available Components
- Usage Examples
- Perfect For
- Advanced Features
- Documentation
- Project Status
- Contributing
- License
- Author
- See Also
- FAQ
π Quick Start
The fastest way to get started:
ng add @ng-zen/cli
This command:
- β Installs the package
- β Sets up your project configuration
- β Ready to generate components
Then generate your first component:
ng generate @ng-zen/cli:component
Select components from an interactive menu and they'll be generated directly into your current directory! π
π¦ Installation
Recommended: Using ng add
ng add @ng-zen/cli
Manual Installation
# Stable version
pnpm add -D @ng-zen/cli
# Latest features and fixes
pnpm add -D @ng-zen/cli@next
π§© Available Components
Component | Description | Features |
---|---|---|
Avatar | User profile images and initials | Image fallback, size variants, rounded styles |
Alert | Informational messages | Customizable styles, dismissible options |
Button | Interactive buttons | Primary/secondary variants, loading states, icons |
Checkbox | Form checkboxes | Indeterminate state, custom styling, validation |
Divider | Visual separators | Horizontal/vertical, with labels, custom thickness |
Form Control | Form field wrapper | Labels, validation messages, required indicators |
Icon | SVG icon system | Huge Icons integration, size variants, colors |
Input | Text input fields | Validation states, prefixes/suffixes, types |
Skeleton | Loading placeholders | Multiple shapes, animation, responsive |
Switch | Toggle controls | On/off states, disabled state, custom labels |
Textarea | Multi-line text input | Auto-resize, character counts, validation |
π‘ More components coming soon! Planned: Directives, Pipes, Services, and additional UI elements.
π‘ Usage Examples
Basic Component Generation
# Interactive mode - choose components from a menu
ng generate @ng-zen/cli:component
# Generate specific components
ng generate @ng-zen/cli:component --components avatar button
# Custom location
ng generate @ng-zen/cli:component ./src/app/ui --components input checkbox
# Include Storybook stories
ng generate @ng-zen/cli:component --components button --stories
What Gets Generated
Each component set includes:
src/app/ui/
βββ button/
β βββ button.ts # Component logic
β βββ button.scss # Customizable styles
β βββ button.spec.ts # Unit tests
β βββ button.stories.ts # Storybook documentation
β βββ index.ts # Barrel exports
β βββ README.md # Component-specific docs
βββ input/
βββ input.ts
βββ input.scss
βββ input.spec.ts
βββ input.stories.ts
βββ index.ts
βββ README.md
Real-World Usage
// After generation, import and use like any Angular component
import { ZenButton } from './ui/button';
import { ZenInput } from './ui/input';
@Component({
selector: 'app-login',
imports: [ZenButton, ZenInput],
template: `
<form>
<zen-input placeholder="Enter email" type="email" />
<button variant="primary" zen-button>Sign In</button>
</form>
`,
})
export class LoginComponent {}
π― Perfect For
π’ Enterprise Teams
- Build consistent internal component libraries
- Maintain design system compliance across projects
- Avoid vendor lock-in with owned source code
π Startup Projects
- Rapid prototyping with production-ready components
- Easy customization as requirements evolve
- No licensing concerns or bundle size bloat
π©βπ» Angular Developers
- Learn modern Angular patterns (signals, standalone components)
- Speed up UI development workflow
- Maintain full control over component behavior
π¨ Design Systems
- Use as foundation for custom component libraries
- Extend and modify components to match brand guidelines
- Generate consistent documentation automatically
β‘ Advanced Features
Modern Angular Architecture
- Standalone Components: No NgModule dependencies
- OnPush Change Detection: Optimized performance
- Angular Signals: Reactive state management
- TypeScript 5.8+: Latest language features
Customization System
// Easy theming with CSS variables
:root {
--zen-button-primary-bg: #your-brand-color;
--zen-button-border-radius: 8px;
--zen-button-font-weight: 600;
}
Testing Integration
- Jest Ready: All tests use Jest framework
- Component Testing: Isolated unit tests for each component
- Storybook Testing: Visual testing and documentation
Development Tools
- ESLint Integration: Code quality enforcement
- Prettier Support: Consistent code formatting
- Husky Hooks: Pre-commit validation
π Documentation
- π Live Storybook Demo - Interactive component examples
- π§ Development Guide - Setup and contribution workflow
- π€ Contributing Guide - How to contribute to the project
- π Changelog - Version history and breaking changes
- π¬ Component READMEs - Detailed docs generated with each component
π§ Project Status
π’ Actively Developed & Production Ready
- β Core Features: Component generation is stable and tested
- β Angular 20+ Support: Compatible with latest Angular versions
- π Continuous Improvement: Regular updates and new components
- π Roadmap: Directives, pipes, services, and more UI components planned
Release Channels
@ng-zen/cli
- Stable releases frommaster
branch@ng-zen/cli@next
- Pre-releases fromnext
branch with latest features
Important: Since @ng-zen/cli generates code into your project, you own that code completely. Updates to the CLI primarily add new features and components - they won't break your existing generated components.
π€ Contributing
We welcome contributions! Whether it's:
- π Bug Reports - Help us improve reliability
- π‘ Feature Requests - Suggest new components or capabilities
- π§ Code Contributions - Add features or fix issues
- π Documentation - Improve guides and examples
π Do you urgently need some new features? Report them in the
issues
section! They will be scheduled for the next deployments.
Getting Started:
- Read our Contributing Guidelines
- Check the Development Setup
- Browse open issues
- Join the discussion!
License
This project is licensed under the BSD 2-Clause License π.
Author
Konrad StΔpieΕ - Creator & Maintainer
- π GitHub: @kstepien3
- πΌ LinkedIn: Konrad StΔpieΕ
- π§ Email: kord.stp@gmail.com
See Also
- ngx-schematic-builder - Custom Angular builder for compiling schematics (used by this project)
FAQ
β How is this different from Angular Material or PrimeNG?
Traditional UI libraries give you pre-compiled components that you can't modify. @ng-zen/cli generates the actual source code into your project, so you have complete control. You can modify the TypeScript, HTML, and SCSS files however you need.
β Can I customize the generated components?
Absolutely! That's the whole point. Every component is generated as editable source code in your project. You can:
- Modify the TypeScript logic
- Change the HTML templates
- Customize the SCSS styles
- Extend functionality as needed
β What happens when I update @ng-zen/cli?
Updates to the CLI add new features and components but don't affect your already-generated code. Your components belong to you and won't be overwritten. You can always generate new components with the latest features.
β Does this work with existing Angular projects?
Yes! @ng-zen/cli works with any Angular 20+ project. Just run ng add @ng-zen/cli
in your existing project and start generating components.
β Can I use this in production?
Definitely! The generated components are production-ready with:
- Full TypeScript type safety
- Comprehensive unit tests
- Optimized performance (OnPush change detection)
- Accessibility considerations
- Modern Angular best practices
β How do I theme the components?
Components use CSS variables for easy theming:
:root {
--zen-primary-color: #your-brand-color;
--zen-border-radius: 8px;
}
For deeper customization, edit the generated SCSS files directly.
β Why no Tailwind CSS?
You can tweak the code to use Tailwind if you want, but avoid adding extra libraries. Our goal is to create base components that are easy to improve later, work without any CSS libraries, and are fully customizable right out of the box.
Ready to take control of your Angular UI components? Get started now! π