# @gluestack-ui/checkbox

> A universal headless Checkbox component for React Native, Next.js & React

Latest version **0.1.39** (published 2025-03-11) · 0 weekly downloads

## Install

```sh
npm install @gluestack-ui/checkbox
pnpm add @gluestack-ui/checkbox
yarn add @gluestack-ui/checkbox
bun add @gluestack-ui/checkbox
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.1.39 |
| Published | 2025-03-11 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 46.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5298 |
| Maintainers | vidhi499, rohit_singh, viraj-10, rayan1810, rajat693, surajahmedc, meenumakkar, madhavb230100, vaibhk002, daminipandey, amars29, geekgautam, sravankumarvelangi, gluestackadmin, geekashwini, mayankp06 |
| Keywords | react, native, react-native, checkbox, gluestack-ui, universal, headless, typescript, component, android, ios, nextjs |

## Links

- npm: https://www.npmjs.com/package/@gluestack-ui/checkbox
- Repository: https://github.com/gluestack/gluestack-ui
- Homepage: https://github.com/gluestack/gluestack-ui/tree/main/packages/unstyled/checkbox#readme
- Issues: https://github.com/gluestack/gluestack-ui/issues
- npm.io page: https://npm.io/package/@gluestack-ui/checkbox

## Dependencies (8)

- [@gluestack-ui/utils](https://npm.io/package/@gluestack-ui/utils.md) ^0.1.15
- [@react-stately/checkbox](https://npm.io/package/@react-stately/checkbox.md) ^3.4.2
- [@react-native-aria/focus](https://npm.io/package/@react-native-aria/focus.md) ^0.2.9
- [@react-native-aria/utils](https://npm.io/package/@react-native-aria/utils.md) 0.2.12
- [@gluestack-ui/form-control](https://npm.io/package/@gluestack-ui/form-control.md) ^0.1.19
- [@react-aria/visually-hidden](https://npm.io/package/@react-aria/visually-hidden.md) ^3.8.6
- [@react-native-aria/checkbox](https://npm.io/package/@react-native-aria/checkbox.md) ^0.2.10
- [@react-native-aria/interactions](https://npm.io/package/@react-native-aria/interactions.md) 0.2.16

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.39 (latest) — 2025-03-11
- 0.1.23-alpha.0 (alpha) — 2023-12-08
- 0.1.38 — 2025-03-03
- 0.1.37 — 2025-02-19
- 0.1.36 — 2025-02-18
- 0.1.35 — 2025-02-18
- 0.1.34 — 2025-02-18
- 0.1.33 — 2024-11-11
- 0.1.32 — 2024-09-03
- 0.1.31 — 2024-08-27
- 0.1.30 — 2024-07-08
- 0.1.29 — 2024-07-02
- 0.1.28 — 2024-04-03
- 0.1.27 — 2024-04-03
- 0.1.26 — 2024-03-21
- … 23 more at https://npm.io/package/@gluestack-ui/checkbox/versions

## README

# @gluestack-ui/checkbox

## Installation

To use `@gluestack-ui/checkbox`, all you need to do is install the
`@gluestack-ui/checkbox` package:

```sh
$ yarn add @gluestack-ui/checkbox

# or

$ npm i @gluestack-ui/checkbox
```

## Usage

Whether you're building a simple form or a complex data collection system, the Checkbox component offers a user-friendly way for users to select multiple options from a list. Here's an example how to use this package to create one:

```jsx
import { Root, Indicator, Icon, Label, Group } from './styled-components';
import { createCheckbox } from '@gluestack-ui/checkbox';

export const Checkbox = createCheckbox({
  Root,
  Indicator,
  Icon,
  Label,
  Group,
});
```

## Customizing the checkbox:

Default styling of all these components can be found in the components/core/checkbox file. For reference, you can view the [source code](https://github.com/gluestack/gluestack-ui/blob/development/example/storybook/src/ui-components/Checkbox/index.tsx) of the styled `Checkbox` components.

```jsx
// import the styles
import {
  Root,
  Indicator,
  Icon,
  Label,
  Group,
} from '../components/core/checkbox/styled-components';

// import the createCheckbox function
import { createCheckbox } from '@gluestack-ui/checkbox';

// Understanding the API
const Checkbox = createCheckbox({
  Root,
  Indicator,
  Icon,
  Label,
  Group,
});

// Using the checkbox component
export default () => (
  <CheckboxGroup>
    <Checkbox>
      <CheckboxIndicator>
        <CheckboxIcon />
      </CheckboxIndicator>
      <CheckboxLabel />
    </Checkbox>
  </CheckboxGroup>
);
```

More guides on how to get started are available
[here](https://ui.gluestack.io/docs/components/forms/checkbox).

---
_Source: https://npm.io/package/@gluestack-ui/checkbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
