# markdown-it-codetabs

> Show your code blocks in different tabs.

Latest version **1.2.0** (published 2021-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown-it-codetabs
pnpm add markdown-it-codetabs
yarn add markdown-it-codetabs
bun add markdown-it-codetabs
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2021-01-05 |
| First published | 2020-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | cncws |
| Maintainers | cncws |
| Keywords | markdown-it, markdown-it-plugin, tabs |

## Links

- npm: https://www.npmjs.com/package/markdown-it-codetabs
- Repository: https://github.com/cncws/markdown-it-codetabs
- Homepage: https://github.com/cncws/markdown-it-codetabs#readme
- Issues: https://github.com/cncws/markdown-it-codetabs/issues
- npm.io page: https://npm.io/package/markdown-it-codetabs

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2021-01-05
- 1.1.0 — 2020-12-29
- 1.0.3 — 2020-12-25
- 1.0.2 — 2020-12-25
- 1.0.1 — 2020-12-25
- 1.0.0 — 2020-12-25

## README

# markdown-it-codetabs

> Code tabs plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.

## Install

```bash
npm install markdown-it-codetabs --save
```

## Use

1. Render your file:

    ```js
    var md = require('markdown-it')()
                .use(require('markdown-it-codetabs'));
    // `group` and `tab` can only contain characters in [A-Za-z0-9_].
    md.render('```js [group:tab]\nconsole.log("hello");\n```');
    ```

2. Import your own styles, you can start from [codetabs.scss](https://github.com/cncws/markdown-it-codetabs/blob/main/assets/codetabs.scss).

## MD Example

~~~md
```js [g1:JavaScript]
console.log("hello");
```

```py [g1:Python3]
print("hello")
```
~~~

**Notice:** DON'T add anything except white space between two code blocks.

---
_Source: https://npm.io/package/markdown-it-codetabs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
