# @leafygreen-ui/radio-box-group

> leafyGreen UI Kit RadioBoxGroup

Latest version **15.0.12** (published 2026-10-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @leafygreen-ui/radio-box-group
pnpm add @leafygreen-ui/radio-box-group
yarn add @leafygreen-ui/radio-box-group
bun add @leafygreen-ui/radio-box-group
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 15.0.12 |
| Published | 2026-10-02 |
| First published | 2019-04-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 497 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 274 |
| Maintainers | thesonofthomp, shaneeza, stephl3, aitchpgm, hnevins, _tsck |

## Links

- npm: https://www.npmjs.com/package/@leafygreen-ui/radio-box-group
- Repository: https://github.com/mongodb/leafygreen-ui
- Homepage: https://github.com/mongodb/leafygreen-ui/tree/main/packages/radio-box-group
- Issues: https://jira.mongodb.org/projects/PD/summary
- npm.io page: https://npm.io/package/@leafygreen-ui/radio-box-group

## Dependencies (5)

- [@leafygreen-ui/lib](https://npm.io/package/@leafygreen-ui/lib.md) ^15.7.1
- [@leafygreen-ui/hooks](https://npm.io/package/@leafygreen-ui/hooks.md) ^9.3.2
- [@leafygreen-ui/tokens](https://npm.io/package/@leafygreen-ui/tokens.md) ^4.2.3
- [@leafygreen-ui/emotion](https://npm.io/package/@leafygreen-ui/emotion.md) ^5.2.1
- [@leafygreen-ui/palette](https://npm.io/package/@leafygreen-ui/palette.md) ^5.0.3

## Recent versions

- 15.0.12 (latest) — 2026-10-02
- 12.0.10 (beta) — 2023-07-26
- 13.0.0-alpha.1 (alpha) — 2023-07-20
- 12.0.8-next.7 (next) — 2023-05-26
- 9.1.0-test.0 (test) — 2022-09-22
- 15.0.11 — 2026-01-21
- 15.0.10 — 2025-11-13
- 15.0.9 — 2025-10-31
- 15.0.8 — 2025-10-21
- 15.0.7 — 2025-09-25
- 15.0.6 — 2025-09-10
- 15.0.5 — 2025-09-03
- 15.0.4 — 2025-07-28
- 15.0.3 — 2025-07-03
- 15.0.2 — 2025-06-30
- … 89 more at https://npm.io/package/@leafygreen-ui/radio-box-group/versions

## README

# Radio Box Group

![npm (scoped)](https://img.shields.io/npm/v/@leafygreen-ui/radio-box-group.svg)

#### [View on MongoDB.design](https://www.mongodb.design/component/radio-box-group/live-example/)

## Installation

### PNPM

```shell
pnpm add @leafygreen-ui/radio-box-group
```

### Yarn

```shell
yarn add @leafygreen-ui/radio-box-group
```

### NPM

```shell
npm install @leafygreen-ui/radio-box-group
```

## Peer Dependencies

| Package                              | Version  |
| ------------------------------------ | -------- |
| `@leafygreen-ui/leafygreen-provider` | `^1.1.0` |

## Example

```js
import { RadioBox, RadioBoxGroup } from '@leafygreen-ui/radio-box-group';

<RadioBoxGroup className="radio-box-group-style">
  <RadioBox value="option-1">Radio Box 1</RadioBox>
  <RadioBox value="option-2">Radio Box 2</RadioBox>
</RadioBoxGroup>;
```

## Properties

| Prop        | Type                               | Description                                                                                                      | Default     |
| ----------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------- |
| `size`      | `'compact'`, `'default'`, `'full'` | Sets the style of the `<RadioBoxGroup />`.                                                                       | `'default'` |
| `name`      | `string`                           | Sets the name of the input group.                                                                                |             |
| `value`     | `string`, `number`                 | Sets the `<Radio />` that will appear checked on page load, also makes the component a controlled component      |             |
| `className` | `string`                           | Adds a className to the root element                                                                             |             |
| `children`  | `node`                             | Content of the component                                                                                         |             |
| `onChange`  | `function`                         | The event handler function for the 'onChange' event. Receives the associated event object as the first argument. | `() => {}`  |
| ...         | native `div` attributes            | Any other props will be spread on the root `div` element                                                         |             |

# Radio Box

## Example

```js
<RadioBox value="option-2">Radio Box 2</RadioBox>
```

## Properties

| Prop               | Type                      | Description                                                                                                     | Default |
| ------------------ | ------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- |
| `value` (Required) | `string`, `number`        | Every `<RadioBox />` needs a value prop                                                                         |         |
| `className`        | `string`                  | Adds a className to the root element                                                                            | `''`    |
| `checked`          | `boolean`                 | Indicates whether or not the box will be checked                                                                | `false` |
| `disabled`         | `boolean`                 | Indicates whether or not the radio can be clicked by a user                                                     | `false` |
| `children`         | `node`                    | Content that appears inside of the `<RadioBox />`                                                               |         |
| `default`          | `boolean`                 | If `<RadioBoxGroup />` is uncontrolled, the default property makes this RadioBox checked on the initial render. |         |
| ...                | native `input` attributes | Any other props will be spread on the root `input` element                                                      |         |

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