Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@lion/form-core
Advanced tools
Form-core contains all essential building blocks for creating form fields and fieldsets
This page should be used as a starting point when first using the Form System. It provides an overview of its essential building blocks and provides links to detailed explanations of most of its core concepts.
Our Form System is built from a set of very fundamental building blocks: form control
s, field
s and fieldset
s.
Form control
s are the most fundamental building blocks of our Form System.
They are the fundament of both field
s, and fieldset
s and provide a normalized, predictable API throughout the whole form. Every form element inherits from FormControlMixin
.
FormControlMixin
creates the default html structure and accessibility is designed to be used in conjunction with the ValidateMixin and the FormatMixin.
Fields (think of an input, textarea, select) are the actual form controls the end user interacts with. They extend LionField
, which in turn uses the FormControlMixin
. Fields provide a normalized API for both platform components and custom made form controls.
On top of this, they feature:
Form control
s are the most fundamental building block of the Forms. They are the basis of
both field
s and fieldset
s, and the form
itself.<input>
.<textarea>
.<select>
.Whenever a native form control doesn't exist or is not sufficient, a custom form field should be created. One could think of components like:
<input type="date">
.<input type="date">
including a calendar dropdown.<input type="number">
special for amounts.<input type="email">
.<input type="range">
.<input type="number">
.<select>
with multiline options.For form controls which return a checked-state
you can use the lion-choice-input
mixin. It is used in:
<input type="checkbox">
.<option>
.<input type="radio">
.Which contains the following features:
choiceValue()
..modelValue
.checked
boolean attribute.Fieldsets are groups of fields. They can be considered fields on their own as well, since they partly share the normalized API via FormControlMixin
. Fieldsets are the basis for:
<form>
component.FAQs
Form-core contains all essential building blocks for creating form fields and fieldsets
The npm package @lion/form-core receives a total of 1,946 weekly downloads. As such, @lion/form-core popularity was classified as popular.
We found that @lion/form-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.