7.0.0 • Published 4 months ago

@twa-dev/sdk v7.0.0

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

SDK

npm version

npm package for Telegram Web Apps (TWA) SDK.

npm i @twa-dev/sdk

Motivation

Telegram distributes SDK via link. It's kinda old fashion way to work with a library:

<html lang="en">
<head>
    <title>TWA</title>
    <meta charset="UTF-8">
    <script src="https://telegram.org/js/telegram-web-app.js"></script>
    <script>
        window.Telegram.WebApp.showAlert('Hey there!');
    </script>
</head>
<body></body>
</html>

This package allows to work with SDK as with a npm package:

import WebApp from '@twa-dev/sdk'

WebApp.showAlert('Hey there!');

And yes, it supports TS.

Demo

Codesandbox

React

If you use React in your project, check out MainButton and BackButton components that we have prepared for you. These components significantly simplify developer experience.

7.0.0

4 months ago

6.9.2

5 months ago

6.9.1-beta.0

6 months ago

6.9.0

7 months ago

6.7.1

9 months ago

6.8.0

9 months ago

6.9.1

6 months ago

6.7.0

10 months ago

0.0.13

1 year ago

0.0.14

1 year ago

6.4.2

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.12

2 years ago

0.0.11-rc.0

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.3-rc.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago