Socket
Socket
Sign inDemoInstall

@lion/field

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/field

Fields are the most fundamental building block of the Form System


Version published
Maintainers
1
Created
Source

Form Fundaments

🛠 Status: Pilot Phase

Lion Web Components are still in an early alpha stage; they should not be considered production ready yet.

The goal of our pilot phase is to gather feedback from a private group of users. Therefore, during this phase, we kindly ask you to:

  • not publicly promote or link us yet: (no tweets, blog posts or other forms of communication about Lion Web Components)
  • not publicly promote or link products derived from/based on Lion Web Components

As soon as Pilot Phase ends we will let you know (feel free to subscribe to this issue https://github.com/ing-bank/lion/issues/1)

Fields are the most fundamental building block of the Form System. They are the basis of both fields and fieldsets.

What are fields?

Fields are the actual form controls the end user interacts with. They extend the LionField class, which on its turn uses the FormControlMixin. Fields provide a normalized, predictable API for platform components and customly made form controls. On top of this, they feature:

  • data synchronization with models
  • formatting of view values
  • advanced validation possibilities
  • creation of advanced user interaction scenarios via interaction states
  • provision of labels, help texts in an easy, declaritive manner
  • better focus management
  • accessibility out of the box
  • advanced styling possibilities: map your own Design System to the internal HTML structure

Platform wrappers

  • LionInput, a wrapper for <input>
  • LionTextarea, a wrapper for <textarea>
  • LionSelect, a wrapper for <select>

Custom wrappers

Whenever a native form control doesn't exist or is not sufficient, a custom form control should be created. One could think of components like:

  • slider
  • combobox
  • autocomplete
  • etc...

What are fieldsets?

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:

  • LionFieldset
  • LionForm
  • LionRadioGroup
  • LionCheckboxGroup

Other Resources

  • FormControlMixin (TODO: document)
  • LionField (TODO: document)
  • Model values
  • FormatMixin
  • InteractionStateMixin (TODO: document)
  • ValidateMixin (TODO: document)
  • FocusMixin (TODO: document)
  • FieldCustomMixin (TODO: document)

Keywords

FAQs

Package last updated on 26 Apr 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc