← ClaudeAtlas

tg-miniapp-uilisted

Use when building or debugging the interface of a Telegram Mini App: theme colors and dark mode, safe areas and notches, fullscreen, keyboard and viewport height, MainButton and SecondaryButton, BackButton, haptic feedback, performance on weak Android, or a layout bug that shows up only on a real iPhone, Android or Desktop client.
serejaris/telegram-skills · ★ 41 · Web & Frontend · score 87
Install: claude install-skill serejaris/telegram-skills
# tg-miniapp-ui Checked against the official docs on 2026-10-30: Bot API 10.3 (latest, August 24, 2026), Mini Apps page, `telegram-web-app.js?64`. ## Not verified live No client or device was used to write this skill. API facts come from the docs; bug reports come from public trackers. Acceptance on a real iPhone and Android device is still ahead: run the [check](#device-check) below. A browser emulator doesn't catch these bugs. Client bugs with platform, client, issue number and date: [`client-pitfalls.md`](client-pitfalls.md). Read it before you blame your own CSS. ## Startup Put `telegram-web-app.js` in `<head>` before other scripts. Call `Telegram.WebApp.ready()` as soon as the essential interface is loaded: it hides the loading placeholder. `expand()` asks for the maximum height; `isExpanded` reports it. ## Theme Color everything from the theme and repaint on change. There is no separate dark mode API: `colorScheme` is `light` or `dark`, and the palette follows it. ```css body { background: var(--tg-theme-bg-color); color: var(--tg-theme-text-color); } .hint { color: var(--tg-theme-hint-color); } .card { background: var(--tg-theme-section-bg-color, var(--tg-theme-secondary-bg-color)); } ``` - `themeParams` fields map to `--tg-theme-*` variables, and every field is optional. Give each a fallback. Fields by version: `secondary_bg_color` 6.1; header, accent, section, subtitle and destructive colors 7.0; `section_separator_color` 7.6; `bottom_bar_bg_color` 7.10