0.4.1 • Published 2 years ago
lit-forms v0.4.1
lit-forms
Forms framework for lit inspired by Angular Forms.
⚠️ Please note that all versions prior to 1.0.0 of this library do not follow SemVer standards, thus, minor versions may introduce breaking changes.
Installation
$ npm install --save lit-forms
Usage
const form = FB.form(this, {
email: FB.control(''),
password: FB.control(''),
});
<form
${form.attach()}
@lf:submit="${() => {
console.log(form.value);
}}"
>
<div>
<label for="email">E-mail:</label>
<input id="email" type="email" required ${form.components.email.attach()}>
</div>
<div>
<label for="password">Password:</label>
<input id="password" type="password" required ${form.components.password.attach()}>
</div>
</form>
Features
- Support for native, Spectrum, Shoelace, vaadin or custom form fields
- Built-in validation
- Custom validators
- Structured form data with groups and arrays
- Zero dependencies
Documentation
- Creating form builder (FB)
- Submitting form
- Structuring forms
- Custom form fields implementation
- Validation
- Events
- States
- Rxjs
Where to go next
0.4.1
2 years ago
0.4.0
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago