Skip to content

📱 Vue 3 telegram mini app package

License

Notifications You must be signed in to change notification settings

kolirt/vue-telegram-mini-app

Repository files navigation

Vue 3 telegram mini apps

Vue 3 telegram mini app package

npm peer dependency version npm bundle size npm-version licence

Structure

Buy Me A Coffee

Getting started

Installation

npm install --save @kolirt/vue-telegram-mini-app

yarn add @kolirt/vue-telegram-mini-app

Setup

import { createApp } from 'vue'
import { createTelegramMiniApp } from '@kolirt/vue-telegram-mini-app'

const app = createApp({ ... })

app.use(createTelegramMiniApp({
  alwaysExpand: true,
  closingConfirmation: true
}))

app.mount('#app')

Telegram Mini Apps API implementation status

  • initData
  • initDataUnsafe
  • version
  • platform
  • colorScheme
  • themeParams
  • isExpanded
  • viewportHeight
  • viewportStableHeight
  • headerColor
  • backgroundColor
  • isClosingConfirmationEnabled
  • isVerticalSwipesEnabled
  • BackButton
    • isVisible
    • BackButton.onClick
    • BackButton.offClick
    • BackButton.show
    • BackButton.hide
  • MainButton
  • SettingsButton
  • HapticFeedback
    • HapticFeedback.impactOccurred
    • HapticFeedback.notificationOccurred
    • HapticFeedback.selectionChanged
  • CloudStorage
    • CloudStorage.setItem
    • CloudStorage.getItem
    • CloudStorage.getItems
    • CloudStorage.removeItem
    • CloudStorage.removeItems
    • CloudStorage.getKeys
  • BiometricManager
  • isVersionAtLeast
  • setHeaderColor(color)
  • setBackgroundColor(color)
  • enableClosingConfirmation()
  • disableClosingConfirmation()
  • enableVerticalSwipes()
  • disableVerticalSwipes()
  • onEvent(eventType, eventHandler)
  • offEvent(eventType, eventHandler)
  • sendData(data)
  • switchInlineQuery(query[, choose_chat_types])
  • openLink(url[, options])
  • openTelegramLink(url)
  • openInvoice(url[, callback])
  • showPopup(params[, callback])
  • showAlert(message[, callback])
  • showConfirm(message[, callback])
  • showScanQrPopup(params[, callback])
  • closeScanQrPopup()
  • readTextFromClipboard([callback])
  • requestWriteAccess([callback])
  • requestContact([callback])
  • ready()
  • expand()
  • close()

FAQ

Check closed issues with FAQ label to get answers for most asked questions

License

MIT

Other projects

Check out my other projects on my GitHub profile