package.dist.components.checkbox.checkbox-group.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react Show documentation
Show all versions of react Show documentation
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
The newest version!
'use client';
import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { createSplitProps } from '../../utils/create-split-props.js';
import { ark } from '../factory.js';
import { checkboxAnatomy } from './checkbox.anatomy.js';
import { useCheckboxGroup } from './use-checkbox-group.js';
import { CheckboxGroupContextProvider } from './use-checkbox-group-context.js';
const CheckboxGroup = forwardRef((props, ref) => {
const [checkboxGroupProps, localProps] = createSplitProps()(props, [
"defaultValue",
"value",
"onValueChange",
"disabled",
"invalid",
"readOnly",
"name"
]);
const checkboxGroup = useCheckboxGroup(checkboxGroupProps);
return /* @__PURE__ */ jsx(CheckboxGroupContextProvider, { value: checkboxGroup, children: /* @__PURE__ */ jsx(ark.div, { ref, role: "group", ...localProps, ...checkboxAnatomy.build().group.attrs }) });
});
CheckboxGroup.displayName = "CheckboxGroup";
export { CheckboxGroup };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy