Forms
The forms utility library provides a base mixin to make it easy to create form associated custom elements. Form associated custom elements enable components to integrate with form value state and validation. This creates a reliable and predictable API contract for components. This project is in the early stages of exploration. Project Source
Getting Started
# local .npmrc file
registry=https://registry.npmjs.org
# https://registry.npmjs.org
npm login
# install
npm install @nvidia-elements/forms
API
Events
inputemitted when the value changes as a result of a user actionchangeemitted when the user modifies and commits the element's value.resetemitted when the control state was reset to its initial valueinvalidemitted when the control is invalid
Properties
valuecontains component statereadonlydetermine if component is in readonly/non-editabledisableddetermine if component is interactivenamename associated to parent formnoValidategetter to check if component is in a no validation stateformgetter to get a reference to component parent formwillValidatedetermine if component validatesvalidityvalidity state of the componentvalidationMessagecurrent validation message of the componentvalueAsStringstringified value of the componentvalueAsNumberparsed number value of the component