Checkbox
Description
A checkbox allows you to select single values for submission in a form (or not).
System Dependencies
Installation
The package can be installed via npm:
npm install empower-inputs --save
Standard Checkbox
Â
Configuration
import { InputSelectionHandler} from 'empower-inputs';
let [formElement, setFormElement] = useState({
sampleCheckbox: {
id: "sampleCheckbox",
type: 'checkbox',
label: "Sample label",
value: false,
disabled: false
}
});
..............
return (
<>
<h4>CHECKBOX BUTTON</h4>
<InputSelectionHandler
config={formElement.sampleCheckbox}
customClass="checkbox-custom-class"
onChanged={(e: any) => inputChangedHandler(e, 'sampleCheckbox')}
/>
</>
)
 Properties
Parent Parameter | Sub Parameter | Data Type | Constraint |
---|---|---|---|
config | Â | JSON Object | Required |
 | id | String | Required |
 | type | String | Required |
 | label | String | Optional |
 | value | Array Object | Required |
 | placeholder | String | Optional |
 | readOnly | Boolean | Optional |
 | disabled | Boolean | Optional |
customClass | Â | String | Optional |
onChanged | Â | Event Method | Required |
References
Repository Link: https://bitbucket.org/empowerteams/empower-inputs
NPM Package: npm: empower-inputs
Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git