Form.Group
Form.Group
provides its children a context that contains ids and attributes
that enable these components to relate to each other according to WCAG guidelines.
Form.Group
renders a FormGroupContextProvider
which will autogenerate a
controlId if none is supplied and offers size
, isInvalid
, isValid
in the
context. Form.Control
, Form.Label
, and Form.Control.Feedback
consume this context.
Basic Usage
Any Paragon component or export may be added to the code example.
Any Paragon component or export may be added to the code example.
Sizes
Any Paragon component or export may be added to the code example.
Theme Variables#
CSS Variable | Computed Value |
---|---|
| |
| |
| |
| |
| |
Props API#
- children
node
RequiredSpecifies contents of the component.
- className
string
Specifies class name to append to the base element.
- as
elementType
Default'div'Specifies base element for the component.
- controlId
string
Specifies id to use in the group, it will be used as
htmlFor
inFormLabel
and asid
in input components. Will be autogenerated if none is supplied. - isInvalid
bool
DefaultfalseSpecifies whether to display components in invalid state, this affects styling.
- isValid
bool
DefaultfalseSpecifies whether to display components in valid state, this affects styling.
- size
enum
'sm' | 'lg'Specifies size for the component.
Usage Insights#
FormGroup
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-learner-dashboard | 20.46.2 | 1 | |
prospectus | 20.46.2 | 1 |