# carbon-react-code-mirror

> Carbon React Code Mirror is a wrapper for [@uiw/react-codemirror](https://www.npmjs.com/package/@uiw/react-codemirror) that uses Carbon styling.

Latest version **0.2.3** (published 2023-11-06) · 0 weekly downloads

## Install

```sh
npm install carbon-react-code-mirror
pnpm add carbon-react-code-mirror
yarn add carbon-react-code-mirror
bun add carbon-react-code-mirror
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2023-11-06 |
| First published | 2023-03-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 47.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | jvallexm |

## Links

- npm: https://www.npmjs.com/package/carbon-react-code-mirror
- Repository: https://github.com/IBM/carbon-react-code-mirror
- Homepage: https://github.com/IBM/carbon-react-code-mirror#readme
- Issues: https://github.com/IBM/carbon-react-code-mirror/issues
- npm.io page: https://npm.io/package/carbon-react-code-mirror

## Dependencies (7)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [@lezer/highlight](https://npm.io/package/@lezer/highlight.md) ^1.1.6
- [@uiw/react-codemirror](https://npm.io/package/@uiw/react-codemirror.md) ^4.21.20
- [@uiw/codemirror-themes](https://npm.io/package/@uiw/codemirror-themes.md) ^4.21.20
- [@codemirror/lang-javascript](https://npm.io/package/@codemirror/lang-javascript.md) ^6.2.1

## Recent versions

- 0.2.3 (latest) — 2023-11-06
- 0.2.2 — 2023-10-25
- 0.2.1 — 2023-05-09
- 0.2.0 — 2023-05-09
- 0.1.0 — 2023-03-30

## README

# carbon-react-code-mirror

Carbon React Code Mirror is a wrapper for [@uiw/react-codemirror](https://www.npmjs.com/package/@uiw/react-codemirror) that uses Carbon styling.

## Install

```bash
npm i carbon-react-code-mirror
```

## Usage

```js
import React from "react";
import { CarbonCodeMirror } from "carbon-react-code-mirror";

const example = () => {
  return <CarbonCodeMirror code={"<your code here>"} />;
};
```

## Optional Props

Carbon Code Mirror accepts the following optional props:

- `className` - string - Classnames to apply to the code mirror pane
- `readOnly` - boolean - Defaults to `true`
- `light` - boolean - Use light mode, defaults to `false`
- `children` - node - React nodes to render within the code mirror container
- `wrapperClassName` - string - optionally set the classname for the div surrounding code mirror window

---
_Source: https://npm.io/package/carbon-react-code-mirror · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
