{"id":17987796,"url":"https://github.com/dirkluijk/ngx-ultra-reactive-forms","last_synced_at":"2026-04-29T17:33:22.275Z","repository":{"id":37877438,"uuid":"217555880","full_name":"dirkluijk/ngx-ultra-reactive-forms","owner":"dirkluijk","description":"Because Angular Forms are not really reactive.","archived":false,"fork":false,"pushed_at":"2023-01-07T11:05:35.000Z","size":4482,"stargazers_count":2,"open_issues_count":24,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T15:11:29.908Z","etag":null,"topics":["angular","forms","reactive","rxjs"],"latest_commit_sha":null,"homepage":"https://stackblitz.com/edit/ultra-reactive-forms-demo","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirkluijk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-25T14:50:12.000Z","updated_at":"2020-01-22T13:10:16.000Z","dependencies_parsed_at":"2023-02-07T00:02:07.195Z","dependency_job_id":null,"html_url":"https://github.com/dirkluijk/ngx-ultra-reactive-forms","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Fngx-ultra-reactive-forms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Fngx-ultra-reactive-forms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Fngx-ultra-reactive-forms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Fngx-ultra-reactive-forms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirkluijk","download_url":"https://codeload.github.com/dirkluijk/ngx-ultra-reactive-forms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247114197,"owners_count":20885893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","forms","reactive","rxjs"],"created_at":"2024-10-29T19:09:40.348Z","updated_at":"2026-04-29T17:33:17.240Z","avatar_url":"https://github.com/dirkluijk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ultra-reactive Forms for Angular 📝🤩\n\n\u003e Because Angular Forms are not really reactive\n\n[![NPM version](http://img.shields.io/npm/v/ngx-ultra-reactive-forms.svg?style=flat-square)](https://www.npmjs.com/package/ngx-ultra-reactive-forms)\n[![NPM downloads](http://img.shields.io/npm/dm/ngx-ultra-reactive-forms.svg?style=flat-square)](https://www.npmjs.com/package/ngx-ultra-reactive-forms)\n[![Build status](https://img.shields.io/travis/dirkluijk/ngx-ultra-reactive-forms.svg?style=flat-square)](https://travis-ci.org/dirkluijk/ngx-ultra-reactive-forms)\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n[![Tested with Spectator](https://img.shields.io/badge/Tested%20with%20Spectator-%09%E2%99%A5-blue)](https://github.com/ngneat/spectator)\n\n## Overview\n\n### What? 🤔\n\nThis is a small library that makes Angular Forms really reactive!\n\n* Reactive (and [type-safe][1]!) versions of `FormControl`, `FormGroup` and `FormArray`\n* 100% compatible with `@angular/forms` and existing Angular libraries!\n* Additional read-only properties `value$`, `valid$`, `pristine$`, `error$`, `enabled$` and more.\n* Methods for `setValue$` and `setDisabled$`\n\n### Why? 🤷‍♂️\n\nTake the default `FormControl` from Angular.\n\nTo change its value, or to enable/disable it,\nyou need to subscribe to your `Observable` streams:\n\n```typescript\nconst formControl = new FormControl();\nconst otherControl = new FormControl();\n\nyourValue$.subscribe((value) =\u003e {\n  formControl.setValue(value);\n});\n\notherControl.valueChanges.subscribe(() =\u003e {\n  if (otherControl.valid) {\n    formControl.enable();\n  } else {\n    formControl.disable();\n  }\n});\n```\n\nWith this library, this code can simply be written as:\n\n```typescript\nconst formControl = new FormControl(yourValue$);\nconst otherControl = new FormControl('', {\n  disabled$: otherControl.invalid$\n});\n```\n\n## Installation 🌩\n\n##### npm\n\n```\nnpm install ngx-ultra-reactive-forms\n```\n\n##### yarn\n\n```\nyarn add ngx-ultra-reactive-forms\n```\n\n## Usage 🕹\n\n### Importing the module\n\nFirst, you need to import the `UltraReactiveFormsModule` from `ngx-ultra-reactive-forms`.\nThis makes sure that the correct `[formControl]` directive is being used.\n\n### Basic example\n\nThen import your `FormControl`, `FormGroup`, `FormArray` and `ControlValueAccessor`\nfrom `ngx-ultra-reactive-forms` (instead of `@angular/forms`) and you are done!\n\n```typescript\nimport { FormControl, FormGroup } from 'ngx-ultra-reactive-forms';\n\n@Component({ /* ... */ })\nclass YourComponent {\n  myControl = new FormControl\u003cstring\u003e();\n  \n  myFormGroup = new FormGroup\u003cPerson\u003e({\n    name: new FormControl(),\n    birthDate: new FormControl()\n  });\n  \n  formGroupValid$: Observable\u003cboolean\u003e;\n  \n  constructor(private myService: MyService) {}\n  \n  ngOnInit(): void {\n    this.myControl.setValue$(this.myService.someObservableString());\n    this.myFormGroup.setValue$(this.myService.someObservablePerson());\n    \n    this.formGroupValid$ = this.myFormGroup.valid$;\n  }\n}\n```\n\n### Type-safety\n\nThis library provides full type-safety, leveraged by [ngx-typesafe-forms][1].\n\n### Additional reactive properties\n\nWe also provide additional reactive properties.\n\n* `value$`\n* `error$`\n* `enabled$`\n* `pristine$`\n* `valid$`\n* `status$`\n\nCheck out [the whole list][2].\n\n## FAQ\n\n### How does it work?\n\nThe `UltraReactiveFormsModule` exports the `ReactiveFormsModule` from Angular.\n\nIt also provides a special `[formControl]` directive that will detect the custom `FormControl`\nautomatically subscribe/unsubscribe from its reactive properties.\n\n[1]: https://github.com/dirkluijk/ngx-typesafe-forms\n[2]: https://github.com/dirkluijk/ngx-typesafe-forms#additional-reactive-properties\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/dirkluijk\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/2102973?v=4\" width=\"100px;\" alt=\"Dirk Luijk\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDirk Luijk\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/dirkluijk/ngx-typesafe-forms/commits?author=dirkluijk\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/dirkluijk/ngx-typesafe-forms/commits?author=dirkluijk\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://craftsmen.nl/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/16564855?v=4\" width=\"100px;\" alt=\"Daan Scheerens\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaan Scheerens\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-dscheerens\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkluijk%2Fngx-ultra-reactive-forms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirkluijk%2Fngx-ultra-reactive-forms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkluijk%2Fngx-ultra-reactive-forms/lists"}