# @leafygreen-ui/copyable

> leafyGreen UI Kit Copyable

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

## Install

```sh
npm install @leafygreen-ui/copyable
pnpm add @leafygreen-ui/copyable
yarn add @leafygreen-ui/copyable
bun add @leafygreen-ui/copyable
```

## 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 | 12.0.4 |
| Published | 2026-10-02 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 131.7 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/copyable
- Repository: https://github.com/mongodb/leafygreen-ui
- Homepage: https://github.com/mongodb/leafygreen-ui/tree/main/packages/copyable
- Issues: https://jira.mongodb.org/projects/PD/summary
- npm.io page: https://npm.io/package/@leafygreen-ui/copyable

## Dependencies (11)

- [polished](https://npm.io/package/polished.md) ^4.2.2
- [clipboard](https://npm.io/package/clipboard.md) ^2.0.6
- [@leafygreen-ui/lib](https://npm.io/package/@leafygreen-ui/lib.md) ^15.7.1
- [@leafygreen-ui/icon](https://npm.io/package/@leafygreen-ui/icon.md) ^14.9.1
- [@leafygreen-ui/hooks](https://npm.io/package/@leafygreen-ui/hooks.md) ^9.3.2
- [@leafygreen-ui/button](https://npm.io/package/@leafygreen-ui/button.md) ^25.2.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
- [@leafygreen-ui/tooltip](https://npm.io/package/@leafygreen-ui/tooltip.md) ^14.3.3
- [@leafygreen-ui/typography](https://npm.io/package/@leafygreen-ui/typography.md) ^22.2.5

## Recent versions

- 12.0.4 (latest) — 2026-10-02
- 8.0.23-popover.0 (popover) — 2024-01-16
- 8.0.13 (beta) — 2023-07-26
- 9.0.0-alpha.1 (alpha) — 2023-07-20
- 8.0.10-next.7 (next) — 2023-05-26
- 6.0.2-test.1 (test) — 2022-09-29
- 12.0.3 — 2026-01-21
- 12.0.2 — 2025-11-24
- 12.0.1 — 2025-11-13
- 12.0.0 — 2025-10-31
- 11.1.1 — 2025-10-21
- 11.1.0 — 2025-10-07
- 11.0.7 — 2025-09-25
- 11.0.6 — 2025-09-10
- 11.0.5 — 2025-09-03
- … 83 more at https://npm.io/package/@leafygreen-ui/copyable/versions

## README

# Copyable

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

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

## Installation

### PNPM

```shell
pnpm add @leafygreen-ui/copyable
```

### Yarn

```shell
yarn add @leafygreen-ui/copyable
```

### NPM

```shell
npm install @leafygreen-ui/copyable
```

## Example

```js
<Copyable label="Label" description="Description">
  {'npm install @leafygreen-ui/copyable'}
</Copyable>
```

## Properties

| Prop          | Type                   | Description                                                       | Default     |
| ------------- | ---------------------- | ----------------------------------------------------------------- | ----------- |
| `label`       | `string`               | Label text for the copyable contents.                             |             |
| `description` | `string`               | Further text to describe the contents.                            | `undefined` |
| `className`   | `string`               | className applied to the container of the code element            |             |
| `children`    | `string`               | The text that will be copied.                                     |             |
| `darkMode`    | `boolean`              | Determines whether or not the component appears in dark mode.     | `false`     |
| `size`        | `'default'`, `'large'` | The display size of the label, description, and copyable children | `'default'` |
| `copyable`    | `boolean`              | Whether or not a copy button should be shown.                     | `true`      |

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