CheckboxGroup API

API documentation for CheckboxGroup component

CheckboxGroup#

Props#

Defines valid properties in CheckboxGroup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: CheckboxGroupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: CheckboxGroupInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<CheckboxGroupPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: CheckboxGroupInstance) => ReactNode)
null
The children to render.
namestring
null
The name of the checkboxes.
disabledboolean
false
When present, it specifies that the checkbox group should be disabled.
invalidboolean
false
When present, it specifies that the checkbox group is invalid.
onValueChange(event: CheckboxGroupChangeEvent) => void
null
Callback fired when the checkboxgroup's value state changes.
valueunknown[]
null
Value of the checkbox group.
defaultValueunknown[]
null
The default value of the checkbox group.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in CheckboxGroup component.

nametypedefaultdescription
valueunknown[]
null
Value of the checkbox group.

Exposes#

Defines the methods and properties exposed by CheckboxGroup component.

nametypedefaultdescription
stateuseCheckboxGroupState
null
The state of the checkbox group.
updateChange(event: useCheckboxChangeEvent<SyntheticEvent<Element, Event>> & { value: unknown }) => void
null
Updates the value of the checkbox group.

Events#

Event fired when the checkbox's checked state changes.

nametypedescription
valueunknown[]The value of the checkbox group.

Interfaces#

Defines passthrough(pt) options of Checkbox component.

nametypedefaultdescription
rootCheckboxGroupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of CheckboxGroup component.

values
ComponentInstance<CheckboxGroupProps, CheckboxGroupState, CheckboxGroupExposes>

useCheckboxGroup#

Props#

Defines valid properties in useCheckboxGroup.

nametypedefaultdescription
valueunknown[]
null
Value of the checkbox group.
defaultValueunknown[]
null
The default value of the checkbox group.
onValueChange(event: useCheckboxGroupChangeEvent) => void
null
Callback fired when the checkboxgroup's value state changes.

State#

Defines valid state in useCheckboxGroup.

nametypedefaultdescription
valueunknown[]
null
Value of the checkbox group.

Exposes#

Defines the methods and properties exposed by useCheckboxGroup.

nametypedefaultdescription
stateuseCheckboxGroupState
null
The state of the checkbox group.
updateChange(event: useCheckboxChangeEvent<SyntheticEvent<Element, Event>> & { value: unknown }) => void
null
Updates the value of the checkbox group.

Events#

Event fired when the checkbox's checked state changes.

nametypedescription
valueunknown[]The value of the checkbox group.

Types#

Instance of useCheckboxGroup headless.

values
HeadlessInstance<useCheckboxGroupProps, useCheckboxGroupState, useCheckboxGroupExposes>