@ngx-formly
Ngx Formly is a dynamic JSON powered form library for Angular (mainly based an on Angular Reactive Forms) that bring unmatched maintainability to your application's forms.
Supported UI libs
UI | |
---|---|
Bootstrap | ✅ |
Ionic | ✅ |
Kendo | ✅ |
Material2 | ✅ |
PrimeNG | ✅ |
NativeScript | ❌ |
Which Version to use?
Angular version | Formly version |
---|---|
Angular >= 6 | @ngx-formly/core@4.x |
Angular >= 5 | @ngx-formly/core@3.x |
Angular >= 4 | @ngx-formly/core@2.x |
Angular >= 2 | ng-formly@1.x |
Quick links
- Documentation, demos, and guides
- StackBlitz Template
Quick Start
Follow these steps to get started with Ngx Formly. Also check out our demos for further examples.
1. Install @angular/forms and @ngx-formly/core packages:
npm install @angular/forms @ngx-formly/core --save
2. Choose and install your UI (pre-defined types/templates) package:
- Material2:
- Ensure you have already installed material2 https://material.angular.io/guide/getting-started
- Install
@ngx-formly/material
npm install @ngx-formly/material --save
-
npm install @ngx-formly/bootstrap --save
-
npm install @ngx-formly/ionic --save
-
npm install @ngx-formly/primeng --save
-
npm install @ngx-formly/kendo --save
FormlyModule
and UI (pre-defined types/templates):
3. Import the ;;;; // for material2 import `FormlyMaterialModule`:// import {FormlyMaterialModule} from '@ngx-formly/material'; // for ionic import `FormlyIonicModule`:// import {FormlyIonicModule} from '@ngx-formly/ionic'; // for primeng import `FormlyPrimeNGModule`:// import {FormlyPrimeNGModule} from '@ngx-formly/primeng'; // for kendo import `FormlyKendoModule`:// import {FormlyKendoModule} from '@ngx-formly/kendo';
3. Define the form config in your component:
;;;
From there, it's just JavaScript. Allowing for DRY, maintainable, reusable forms.
Roadmap
See the issues labeled enhancement
Thanks
A special thanks to Kent C. Dodds for giving me opportunity to work on this. This library is maintained (with love) by me, Mohammed Zama Khan. Thanks to all contributors! If you're trying to find angular-formly, go here
Contributors
Thanks goes to these wonderful people (emoji key):