React Checkbox Pro

Installation

How to install and set up React Checkbox Pro in your project

Installation

Get started with React Checkbox Pro by following these simple steps:

Install the package

Choose your preferred package manager:

npm install react-checkbox-pro
# or
yarn add react-checkbox-pro
# or
pnpm add react-checkbox-pro

Import the component

Import the components in your React application:

import { Checkbox, CheckboxGroup } from 'react-checkbox-pro';

Basic usage

Here's a simple example to get you started:

function App() {
  return (
    <Checkbox defaultChecked>
      Click me
    </Checkbox>
  );
}

What's included?

Checkbox Component

The main checkbox component with support for controlled and uncontrolled modes

CheckboxGroup Component

Group multiple checkboxes together with shared state management

useCheckbox Hook

A custom hook for advanced checkbox state management

Built-in Styles

Pre-built styles with Tailwind CSS support and custom CSS options

Requirements

  • React 16.8+ (for Hooks support)
  • TypeScript 4.5+ (for type definitions)
  • Tailwind CSS 3.0+ (optional, for default styling)

On this page