@bdt-component-library/input-label
v0.4.6
Published
Input Label component
Downloads
37
Readme
InputLabel Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of input labels according to style guide conventions.
- https://zeroheight.com/990ea04ab/p/98b6fb-input-fields
API
| prop | type | required | default | explanation | |-----------|--------|----------|---------|--------------| | className | string | no | "" | Adds an optional classname to the component | | label | string | yes | n/a | The text for the input label | | hideLabel | boolean | no | n/a | Sets whether the label is intended for screen readers only | | htmlFor | string | yes | n/a | Sets the label for attr | | required | boolean | no | false | Determines whether or not the label is for a required input | | disabled | boolean | no | false | Determines label disabled state | | clickable | boolean | no | false | Determines if the label should have cursor pointer effects | | noBottomMargin | boolean | no | false | Determines whether or not the label has a bottom margin | | nativeRequired | boolean | no | false | Determines whether or not the label is for a required input | | onClick | function(e: event) | no | () => {} | Event handler for onclick event on the label |