
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.
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.
- 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
- 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
- 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
- Quick Start
- Installation
- Available Components
- Usage Examples
- Perfect For
- Advanced Features
- Documentation
- Project Status
- Contributing
- License
- Author
- See Also
- FAQ
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! π
ng add @ng-zen/cli
# Stable version
pnpm add -D @ng-zen/cli
# Latest features and fixes
pnpm add -D @ng-zen/cli@next
Component | Description | Features |
---|---|---|
Avatar | User profile images and initials | Image fallback, size variants, rounded styles |
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.
# 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
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
// 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 {}
- Build consistent internal component libraries
- Maintain design system compliance across projects
- Avoid vendor lock-in with owned source code
- Rapid prototyping with production-ready components
- Easy customization as requirements evolve
- No licensing concerns or bundle size bloat
- Learn modern Angular patterns (signals, standalone components)
- Speed up UI development workflow
- Maintain full control over component behavior
- Use as foundation for custom component libraries
- Extend and modify components to match brand guidelines
- Generate consistent documentation automatically
- Standalone Components: No NgModule dependencies
- OnPush Change Detection: Optimized performance
- Angular Signals: Reactive state management
- TypeScript 5.8+: Latest language features
// Easy theming with CSS variables
:root {
--zen-button-primary-bg: #your-brand-color;
--zen-button-border-radius: 8px;
--zen-button-font-weight: 600;
}
- Jest Ready: All tests use Jest framework
- Component Testing: Isolated unit tests for each component
- Storybook Testing: Visual testing and documentation
- ESLint Integration: Code quality enforcement
- Prettier Support: Consistent code formatting
- Husky Hooks: Pre-commit validation
- π 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
π’ 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
@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.
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!
This project is licensed under the BSD 2-Clause License π.
Konrad StΔpieΕ - Creator & Maintainer
- π GitHub: @kstepien3
- πΌ LinkedIn: Konrad StΔpieΕ
- π§ Email: kord.stp@gmail.com
- ngx-schematic-builder - Custom Angular builder for compiling schematics (used by this project)
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.
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
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.
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.
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
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.
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! π