# hyvor-talk-vue

> ��# Hyvor Talk - Vue > Add Hyvor Talk to Vue Apps [![NPM](https://img.shields.io/npm/v/hyvor-talk-vue.svg)](https://www.npm

Latest version **1.0.5** (published 2022-02-24) · 0 weekly downloads

## Install

```sh
npm install hyvor-talk-vue
pnpm add hyvor-talk-vue
yarn add hyvor-talk-vue
bun add hyvor-talk-vue
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-02-24 |
| First published | 2021-02-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 20.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | supunkavinda, chandimal99 |

## Links

- npm: https://www.npmjs.com/package/hyvor-talk-vue
- npm.io page: https://npm.io/package/hyvor-talk-vue

## Recent versions

- 1.0.5 (latest) — 2022-02-24
- 1.0.4-beta.1 (beta) — 2022-02-24
- 1.0.4-beta.0 — 2022-02-24
- 1.0.4 — 2022-02-24
- 1.0.3 — 2022-02-24
- 1.0.2 — 2021-02-25
- 1.0.1 — 2021-02-25
- 1.0.0 — 2021-02-25

## README

��# Hyvor Talk - Vue

> Add Hyvor Talk to Vue Apps

[![NPM](https://img.shields.io/npm/v/hyvor-talk-vue.svg)](https://www.npmjs.com/package/hyvor-talk-vue) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install hyvor-talk-vue
```

## Library

This library includes two [Components](https://v3.vuejs.org/guide/component-basics.html).

1. `Embed` - To load Hyvor Talk embed
2. `CommentCount` - To load comment counts for listing pages

# Example

```vue
import HyvorTalk from 'hyvor-talk-vue'

<template>
  <div>
  <h1>Article Title</h1>

  <div className="comment-count-view">

  { /* Comment Counts */ }
  <CommentCount 
  websiteId={YOUR_WEBSITE_ID}
  id={WEBPAGE_IDENTIFIER} 
  />

  </div>

  <content>Your Article Here</content>

  { /* Load Comments now */ }
  <Embed 
  websiteId={YOUR_WEBSITE_ID}
  id={WEBPAGE_IDENTIFIER}
  />
  </div>
</template>
```

## HyvorTalk.Embed Component

This component loads the comments iframe into your website and supports the following attributes.

* `websiteId` - (int) (required) ID of your website. This ID is given to you when you register your website on Hyvor Talk. Visit [console](https://talk.hyvor.com/console) find it or create new one.
* `id` - (any) (optional) This is used to identify each web pages uniquely by Hyvor Talk. If you don't set it, the canonical URL will be used as the ID. If canonical URLs are not set URL of the page will be used without query params.
* `url` - (string) (optional) You can explicitly set the URL of the page.
* `loadMode` - (string) (optional) [Load Hyvor Talk on load, click, or scroll](https://talk.hyvor.com/documentation/installation/loading-modes)
* `palette` - (object) (optional) A [palette object](https://talk.hyvor.com/documentation/faq/dynamically-change-colors) to set colors dynamically.
* `sso` - (object) (optional) Single sign-on object. See the [documentation](https://talk.hyvor.com/documentation/sso/set-up) for more details. Note that to use SSO with Vue, you'll need to fetch the SSO details from the backend and render the component after that.


## HyvorTalk.CommentCount

This component can be used to display comment counts on a listing page or a blog page itself. 

Attributes:

* `websiteId`
* `id` - ID of the webpage (should be the same used to load comments)
* `mode` - (string) (optional) Use `mode="number"` to display only the number of comments.


Here's a simple [live demo](https://hyvortalk.github.io/hyvor-talk-vue/)

## License

MIT � [HyvorTalk](https://github.com/HyvorTalk)

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