Form.Label
Provide a label for a form control.
Form.Label uses a FormGroupContext (provided by Form.Group) to ensure that
it has an htmlFor attribute matching the Form.Control according to WCAG guidelines.
Basic usage
Show editable code example
Any Paragon component or export may be added to the code example.
Inline usage
Show editable code example
Any Paragon component or export may be added to the code example.
Usage with grouped control
Show editable code example
Any Paragon component or export may be added to the code example.
Sizes
Show editable code example
Any Paragon component or export may be added to the code example.
See Form.Control for floating labels
Show editable code example
Any Paragon component or export may be added to the code example.
Theme Variables#
| CSS Variable | Computed Value |
|---|---|
| | |
| | |
| | |
| | |
| | |
Props API#
FormLabel Props API
- children
React.ReactNodeRequiredSpecifies contents of the component.
- isInline
booleanDefaultfalseSpecifies whether the component should be displayed with inline styling.
- className
stringSpecifies an additional
classNameto add to the base element.
Usage Insights#
FormLabel
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-authn | 23.14.0 | 1 | |
| frontend-app-communications | 23.12.2 | 1 | |
| frontend-app-communications | 23.12.2 | 3 | |
| frontend-app-communications | 23.12.2 | 1 | |
| frontend-app-course-authoring | 23.15.1 | 3 |