rc-checkbox is a foundational, unstyled React UI component that provides a customizable checkbox input. It aims to offer a robust and accessible base for building more elaborate checkbox UIs. The current stable version is 3.5.0. While active development for this component has effectively transitioned to the `@rc-component/checkbox` namespace, `rc-checkbox` version 3.5.0 remains available on npm. Its release cadence was moderate, with a significant rewrite to TypeScript in v3.0.0, and it differentiates itself by offering a simple, highly composable core component without imposing specific styling frameworks. Users seeking the latest features and ongoing maintenance should consider migrating to the `@rc-component/checkbox` package.
npm install rc-checkboxVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and use the `rc-checkbox` component, managing its checked state and handling changes. It also shows examples of disabled checkboxes and the necessary CSS import.
Review the component's API documentation for updated prop types and usage patterns. Ensure your TypeScript setup correctly resolves the new type definitions.
If accessibility is critical, review the specific a11y features that were reverted and consider implementing alternative solutions or custom a11y attributes until the feature is re-introduced or improved in the successor package.
Update your package dependencies from `rc-checkbox` to `@rc-component/checkbox`. Review the changelog for `@rc-component/checkbox` for any breaking changes introduced since `rc-checkbox@3.5.0` (e.g., DOM structure changes in `@rc-component/checkbox@2.0.0` requiring style adjustments).
Change your import statement from `import { Checkbox } from 'rc-checkbox';` to `import Checkbox from 'rc-checkbox';`.Consult the `rc-checkbox` (or `@rc-component/checkbox`) API documentation to verify valid props. If you're on v3.0.0+, ensure your code adheres to the new TypeScript interfaces.
Verify that `import Checkbox from 'rc-checkbox';` is correctly placed and that `rc-checkbox` is properly installed in your `node_modules`.