# vuepress-plugin-element-tabs

> Vuepress plugin - Tabs Container for Vuepress

Latest version **0.2.8** (published 2020-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuepress-plugin-element-tabs
pnpm add vuepress-plugin-element-tabs
yarn add vuepress-plugin-element-tabs
bun add vuepress-plugin-element-tabs
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.8 |
| Published | 2020-01-01 |
| First published | 2019-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 78.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | superbiger |
| Maintainers | sbiger |
| Keywords | vuepress-plugin, tabs, component |

## Links

- npm: https://www.npmjs.com/package/vuepress-plugin-element-tabs
- Repository: https://github.com/superbiger/vuepress-plugin-tabs
- Homepage: https://github.com/superbiger/vuepress-plugin-tabs#readme
- Issues: https://github.com/superbiger/vuepress-plugin-tabs/issues
- npm.io page: https://npm.io/package/vuepress-plugin-element-tabs

## Dependencies (3)

- [node-sass](https://npm.io/package/node-sass.md) ^4.11.0
- [sass-loader](https://npm.io/package/sass-loader.md) ^7.1.0
- [resize-observer-polyfill](https://npm.io/package/resize-observer-polyfill.md) ^1.5.1

## Recent versions

- 0.2.8 (latest) — 2020-01-01
- 0.1.8 — 2019-06-19
- 0.1.7 — 2019-04-25
- 0.0.7 — 2019-04-24
- 0.0.6 — 2019-04-24
- 0.0.5 — 2019-04-24
- 0.0.4 — 2019-04-24
- 0.0.3 — 2019-04-24
- 0.0.2 — 2019-04-24
- 0.0.1 — 2019-04-24

## README

# [vuepress-plugin-element-tabs](https://superbiger.github.io/vuepress-plugin-tabs/)

<a href="https://www.npmjs.com/package/vuepress-plugin-element-tabs"><img src="https://img.shields.io/npm/v/vuepress-plugin-element-tabs.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vuepress-plugin-element-tabs"><img src="https://img.shields.io/npm/l/vuepress-plugin-element-tabs.svg" alt="License"></a>
<img src="https://img.shields.io/badge/thanks-element-brightgreen.svg"/>

Vuepress plugin - markdown custom container to display content in tabs from [Element UI](https://github.com/ElemeFE/element)

## Docs
> https://superbiger.github.io/vuepress-plugin-tabs

## Install
> This plugin requires VuePress >= 1.0.0, for now you can try it via yarn add vuepress@next -D 

```shell
yarn add vuepress-plugin-element-tabs -D
```

```javascript
// .vuepress/config.js
module.exports = {
  plugins: [
    'vuepress-plugin-element-tabs'
  ]
}
```

## Usage

~~~ md
:::: tabs

::: tab title
__markdown content__
:::


::: tab javascript
``` javascript
() => {
  console.log('Javascript code example')
}
```
:::

::::

~~~

## Documents
> Accepted Value Like That
~~~md
:::: tabs type:board-card
::: tab title lazy
__markdown content__
:::
::::
~~~

### Tabs Attributes
|Attribute|Description|Type|Accepted Values|Default|
|:--|:--|:--|:--|:--|
|type|type of Tab|String|card/border-card|border-card|
|tab-position|position of tabs|String|top/right/bottom/left|top|
|stretch|whether width of tab automatically fits its container|Boolean|-|false|


### Tab Attributes
|Attribute|Description|Type|Accepted Values|Default|
|:--|:--|:--|:--|:--|
|label|title of the tab|String|-|-|
|lazy|whether Tab is lazily rendered|Boolean|-|false|

### Q&A
* How to get mouse position with canvas ?
```javascript

var canvas = document.getElementById('screen');
var mouse = getMouse(canvas);

function addEvent(obj, type, handle) {
  try {
    obj.addEventListener(type, handle, false);
  } catch (e) {
    try {
      obj.attachEvent("on" + type, handle);
    } catch (e) {
      obj["on" + type] = handle;
    }
  }
}

function getMouse(element) {
  var mouse = { x: 0, y: 0 };

  addEvent(element, "mousemove", function(e) {
    var x, y;
    var e = e || window.event;
    const box = element.getBoundingClientRect();
    x = e.clientX - box.x;
    y = e.clientY - box.y;
    mouse.x = x;
    mouse.y = y;
  });

  return mouse;
}
```

---
_Source: https://npm.io/package/vuepress-plugin-element-tabs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
