Fast & light individual form fields supporting real-time bindings, async validation, custom styling, custom fields, IE9+, and more
Note: this library is still under development stage and is being processed through heavy real-world battle testing. Full documentation will be released once this module is ready for alpha release.
let quickfield = require('quickfield')
let field = quickfield({type:'text', label:'Full Name', placeholder:'John Doe'})
field.appendTo(document.body);
field.value = 'abc123' //-> sets field value
console.log(field.value) //-> 'abc123'
quickfield(settings)
settings
is a required argument and represents the configuration of your field. There are various settings that are shared amongst all fields (a.k.a. global settings):
Type: string
Default: system-ui, sans-serif
Font family to use for field UI.
Type: object
Default: {}
Type: object
Type: string|boolean
Default: false
Acts as the field's label. Use false
to disable.
Type: string
Default: ``
The default error message to show when field is invalid or field.state.error = true
Type: string
Default: ``
The default help message to show when field field.state.showHelp = true
Type: boolean
Default: false
Type: string
Default: false
Type: string
Type: string
Default: '100%'
Type: string
Type: string
Default: 736
Type: string
Default: 1
Type: string
Type: string
Type: string
Type: string
Default: 12
Type: string
Default: 14
Type: string
Type: string
Type: string
Default: 22
Type: string
Type: string
Type: string
Type: string
Default: true
Type: string
Default: true