# vue-youtube-widget

> Vue.js YouTube widget for your website using YouTube Api 3

Latest version **0.8.0** (published 2021-09-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-youtube-widget
pnpm add vue-youtube-widget
yarn add vue-youtube-widget
bun add vue-youtube-widget
```

## 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.8.0 |
| Published | 2021-09-23 |
| First published | 2021-08-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Dmitriy Akkerman |
| Maintainers | dmitriyakkerman |
| Keywords | vue, vue.js, youtube-widget, youtube, widget, youtube-api, vue-youtube |

## Links

- npm: https://www.npmjs.com/package/vue-youtube-widget
- Repository: https://github.com/dmitriyakkerman/vue-youtube-widget
- Homepage: https://github.com/dmitriyakkerman/vue-youtube-widget#readme
- Issues: https://github.com/dmitriyakkerman/vue-youtube-widget/issues
- npm.io page: https://npm.io/package/vue-youtube-widget

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.8.0 (latest) — 2021-09-23
- 0.7.0 — 2021-09-05
- 0.6.0 — 2021-08-31
- 0.5.0 — 2021-08-30
- 0.4.0 — 2021-08-30
- 0.3.0 — 2021-08-30
- 0.2.0 — 2021-08-30
- 0.1.0 — 2021-08-30

## README

Vue.js YouTube widget for your website using YouTube Api 3.

![vue-youtube-widget](https://github.com/dmitriyakkerman/vue-youtube-widget/blob/master/images/vue-youtube-widget.png?raw=true)

* Fetches channel's logo, name and subscribers count
* Fetches initial count of videos 
* Loads additional videos

## Usage

1.Install package
```js
npm i vue-youtube-widget
```

2.Import "YouTubeWidget" component in you app:

```js
<template>
  <div>
    <YouTubeWidget apiKey="YOUR_API_KEY" channelId="YOUR_CHANNEL_ID"></YouTubeWidget>
  </div>
</template>

<script>
import YouTubeWidget from 'vue-youtube-widget'

export default {
  components: {
    YouTubeWidget
  }
}
</script>

```

3.Configure component additional props if needed:

```js
<template>
  <div>
    <YouTubeWidget
            apiKey="YOUR_API_KEY"
            channelId="YOUR_CHANNEL_ID"
            :resultsPerRequest="4"
            subscribersCountText="подписчиков"
            subscribeBtnText="Подписаться"
            loadMoreBtnText="Загрузить еще"
    ></YouTubeWidget>
  </div>
</template>

...
```

4.Import "YouTubeWidget" base styles:

```css
...

<style>
  @import "~vue-youtube-widget/dist/YouTubeWidget.min.css";
</style>

```

5.Write your additional custom styles for widget.

6.Enjoy! 🎉

-------------

### Props

##### `apiKey`
API key from Google API Console

*Type:* String  

*Required:* true

##### `channelId`
ID of YouTube channel

*Type:* String  

*Required:* true

##### `resultsPerRequest`
Number of requested videos per request

*Type:* Number

*Required:* false

*Default:* 1

##### `subscribersCountText`
"subscribers" word replacement for localized text using vue-i18n

*Type:* String 

*Required:* false

*Default:* "subscribers"

##### `subscribeBtnText`
"Subscribe" word replacement in "Subscribe" button for localized text using vue-i18n

*Type:* String 

*Required:* false

*Default:* "Subscribe"

##### `loadMoreBtnText`
"Load more" word replacement in "Load more" button for localized text using vue-i18n

*Type:* String 

*Required:* false

*Default:* "Load more"

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