0.8.0 • Published 11 months ago

vue-tg v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

vue-tg - Telegram integration for Vue

docs version downloads 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 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>

Documentation

Instructions

Widgets

Components

Mini Apps

Components

Mapping

FieldComposable
initDatauseWebApp
initDataUnsafeuseWebApp
versionuseWebApp
platformuseWebApp
colorSchemeuseWebAppTheme
themeParamsuseWebAppTheme
isExpandeduseWebAppViewport
viewportHeightuseWebAppViewport
viewportStableHeightuseWebAppViewport
headerColoruseWebAppTheme
backgroundColoruseWebAppTheme
isClosingConfirmationEnableduseWebAppClosingConfirmation
isVerticalSwipesEnableduseWebAppViewport
BackButtonuseWebAppBackButton
MainButtonuseWebAppMainButton
HapticFeedbackuseWebAppHapticFeedback
BiometricManageruseWebAppBiometricManager
isVersionAtLeastuseWebApp
setHeaderColoruseWebAppTheme
setBackgroundColoruseWebAppTheme
enableClosingConfirmationuseWebAppClosingConfirmation
disableClosingConfirmationuseWebAppClosingConfirmation
enableVerticalSwipesuseWebAppViewport
disableVerticalSwipesuseWebAppViewport
onEventuseWebApp
offEventHandled automagically 🪄
sendDatauseWebApp
switchInlineQueryuseWebAppNavigation
openLinkuseWebAppNavigation
openTelegramLinkuseWebAppNavigation
openInvoiceuseWebAppNavigation
shareToStoryuseWebAppShare
showPopupuseWebAppPopup
showAlertuseWebAppPopup
showConfirmuseWebAppPopup
showScanQrPopupuseWebAppQrScanner
closeScanQrPopupuseWebAppQrScanner
readTextFromClipboarduseWebAppClipboard
requestWriteAccessuseWebAppRequests
requestContactuseWebAppRequests
readyuseWebApp
expanduseWebAppViewport
closeuseWebApp
0.8.0

11 months ago

0.7.0

11 months ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago