televue
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.1 • Public • Published

TeleVue

Vue 3 components for Telegram widgets


GitHub last commit


What is it?

This package provides Vue 3 components for Telegram widgets.

Check out interactive demos and docs for more info.

Installation

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>

Basic usage

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>

Package Sidebar

Install

npm i televue

Weekly Downloads

126

Version

1.0.0-alpha.1

License

MIT

Unpacked Size

103 kB

Total Files

15

Last publish

Collaborators

  • skhrvg