Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@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,725 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.