Skip to content

Commit 545c272

Browse files
authored
Update README.md
1 parent 4513a3f commit 545c272

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,19 @@
5555
- [Changelog](#changelog)
5656
- [License](#license)
5757
- [Metrics](#metrics)
58+
5859
<p align="right"><a href="#readme-top">Back to top</a></p>
60+
5961
## Features
6062

6163
- Comprehensive coverage of Telegram Web App JavaScript APIs.
6264
- Framework integrations for **Yew** and **Leptos**.
6365
- Optional macros for automatic initialization and routing.
6466
- Biometric authentication helpers, viewport metrics, and theme utilities in
6567
step with the Telegram WebApp API 9.2 feature set.
68+
6669
<p align="right"><a href="#readme-top">Back to top</a></p>
70+
6771
## Macros
6872

6973
The macros are available with the `macros` feature. Enable it in your `Cargo.toml`:
@@ -116,7 +120,9 @@ impl CustomRouter {
116120
117121
telegram_router!(CustomRouter);
118122
```
123+
119124
<p align="right"><a href="#readme-top">Back to top</a></p>
125+
120126
## Installation
121127

122128
Add the crate to your `Cargo.toml`:
@@ -136,7 +142,9 @@ telegram-webapp-sdk = { version = "0.2.12", features = ["macros", "yew", "mock"]
136142
- `yew` &mdash; exposes a `use_telegram_context` hook and a `BottomButton` component.
137143
- `leptos` &mdash; integrates the context into the Leptos reactive system.
138144
- `mock` &mdash; installs a configurable mock `Telegram.WebApp` for local development.
145+
-
139146
<p align="right"><a href="#readme-top">Back to top</a></p>
147+
140148
## Quick start
141149

142150
### Yew
@@ -202,7 +210,9 @@ fn App() -> impl IntoView {
202210
view! { <BottomButton button=Btn::Main text /> }
203211
}
204212
```
213+
205214
<p align="right"><a href="#readme-top">Back to top</a></p>
215+
206216
## Mock environment
207217

208218
The `mock` feature simulates a `Telegram.WebApp` instance, enabling local development without Telegram:
@@ -234,7 +244,9 @@ app.request_write_access(|granted| {
234244
```
235245

236246
These calls require the user's explicit permission before any information is shared.
247+
237248
<p align="right"><a href="#readme-top">Back to top</a></p>
249+
238250
## Keyboard control
239251

240252
Hide the native keyboard when it's no longer required:
@@ -247,7 +259,9 @@ app.hide_keyboard()?;
247259
# Ok(())
248260
# }
249261
```
262+
250263
<p align="right"><a href="#readme-top">Back to top</a></p>
264+
251265
## Closing confirmation
252266

253267
Prompt users before the Mini App closes:
@@ -263,7 +277,9 @@ app.disable_closing_confirmation()?;
263277
# Ok(())
264278
# }
265279
```
280+
266281
<p align="right"><a href="#readme-top">Back to top</a></p>
282+
267283
## Invoice payments
268284

269285
Open invoices and react to the final payment status:

0 commit comments

Comments
 (0)