This package provides Vue 3 components for Telegram widgets.
Check out interactive demos and docs for more info.
Install with npm:
npm install televue
Install with yarn:
yarn add televue
Or if you just want to try it out with unpkg:
<script src="https://unpkg.com/televue"></script>
Just import TeleVue component in <script setup>
of your SFCs and use it in <template>
:
<script setup>
import { WidgetPost } from 'televue'
</script>
<template>
<WidgetPost post="televuenews/3" />
</template>
Same thing with TeleVue composables:
<script setup>
import { useShareURL } from 'televue'
import { ref } from 'vue'
const href = ref(location.href)
const shareURL = useShareURL(href, 'Your comment')
</script>
<template>
<a
:href="shareURL"
target="_blank"
rel="noreferrer"
>
Share on Telegram
</a>
</template>