@dmitryarkh/vue-tg
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

vue-tg - Telegram integration for Vue

docs version size

A lightweight package for seamless integration of Telegram Mini Apps and Telegram Widgets features.

Usage Example

<script lang="ts" setup>
import { MainButton, useWebAppPopup } from 'vue-tg'

const { showAlert } = useWebAppPopup()
</script>

<template>
  <MainButton text="Open alert" @click="() => showAlert('Hello!')" />
</template>

Installation

Install package:

npm i @dmitryarkh/vue-tg

To connect your Mini App to the Telegram client, place the script telegram-web-app.js in the <head> tag before any other scripts, using this code:

<script src="https://telegram.org/js/telegram-web-app.js"></script>

Package Sidebar

Install

npm i @dmitryarkh/vue-tg

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

92.6 kB

Total Files

40

Last publish

Collaborators

  • dmitryarkh