Control group
Control groups allow related checkboxes and radios to be grouped together.
import { ... } from '@ag.ds-next/react/control-group';
Usage
Control group components can be imported via the control-group
entrypoint in the @ag.ds-next/react
package.
For example:
import { ... } from '@ag.ds-next/react/control-group';
Props
Prop | Type | Description |
---|---|---|
block? | booleanDefault: false | If true, children will be stacked vertically. |
children? | ReactNode | |
hideOptionalLabel? | boolean | If true, "(optional)" will never be appended to the label. |
hint? | string | Provides extra information about the field. |
id? | string | Defines an identifier (ID) which must be unique. |
invalid? | booleanDefault: false | If true, the invalid state will be rendered. |
label? | string | Describes the purpose of the field. |
message? | string | Message to show when the field is invalid. |
name? | string | Sets a custom name attribute on the children Radios & Checkboxes. |
required? | booleanDefault: false | If false, "(optional)" will be appended to the label. |
Source
You can view the full source code for this package on Github.