# zendesk-widget-vue

> Zendesk widget for vue 3

Latest version **0.0.3** (published 2022-08-31) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-08-31 |
| First published | 2022-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 639.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Albert Tornehoj |
| Maintainers | gradguard |
| Keywords | zendesk, vue3 |

## Links

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

## Recent versions

- 0.0.3 (latest) — 2022-08-31
- 0.0.2 — 2022-08-31
- 0.0.1 — 2022-08-31

## README

# Zendesk Widget Vue

Typescript functions to work with Zendesk Widget Vue 3

## Install

`npm i zendesk-widget-vue`

## 1. Add global provider in your base component

```typescript
import { useZendeskProvider } from 'zendesk-widget-vue';

useZendeskProvider({
  token: 'your-token',
  settings: { webWidget: {} },
});
```

## 2. Call the Zendesk status in a child component

```vue
<template>
  <div v-if="zdStatus.isLoading">
    ...Loading
  </div>
  <div v-if="zdStatus.isLoaded">
    JS file was loaded. Zendek chat will be available shortly.
  </div>
  <div v-if="zdStatus.error">
    Error: {{ zdStatus.error }}
  </div>
  <div v-if="zdStatus.isLoaded" style="margin-top:10px;">
    <button @click="() => zendesk.zE('webWidget', 'open')">
      Live Support
    </button>
  </div>
</template>

<script setup lang="ts">
import { useZendesk, zendesk } from 'zendesk-widget-vue';

const { zdStatus } = useZendesk();
</script>
```

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