npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vervstack/chures

v0.0.35

Published

React components and hooks for Telegram OAuth login and toast notifications

Readme

@vervstack/chures

React components and hooks for Telegram OAuth login and toast notifications.

  • TelegramAuth / useTelegramLogin — wire up Telegram Login with a single component or a custom render prop
  • TelegramSignInButton — standalone Telegram-branded button
  • Toaster / useToaster — animated toast notifications with auto-dismiss

CSS is injected automatically — no stylesheet import needed.

Install

npm install @vervstack/chures
# peer deps
npm install framer-motion zustand

Telegram Auth

Drop-in button

import { TelegramAuth } from "@vervstack/chures";

<TelegramAuth
  botId="YOUR_BOT_ID"
  onSuccess={(data) => console.log(data.id_token)}
/>

Custom UI (render prop)

import { TelegramAuth } from "@vervstack/chures";

<TelegramAuth botId="YOUR_BOT_ID" onSuccess={handleAuth}>
  {({ login, isReady }) => (
    <button onClick={login} disabled={!isReady}>
      Sign in with Telegram
    </button>
  )}
</TelegramAuth>

Hook only

import { useTelegramLogin } from "@vervstack/chures";

const { login, isReady } = useTelegramLogin({
  botId: "YOUR_BOT_ID",
  onSuccess: (data) => console.log(data.id_token),
});

TelegramAuth props

| Prop | Type | Default | Description | |---|---|---|---| | botId | string | — | Your Telegram bot ID | | onSuccess | (data: TelegramAuthData) => void | — | Called with auth data on success | | lang | "en" \| "ru" | "en" | Button label language | | title | string | — | Custom button label | | redirectUri | string | window.location.origin | OAuth redirect URI | | requestAccess | string | "write" | Telegram access scope | | children | (props) => ReactNode | — | Render prop for custom UI | | className | string | — | Extra class on the button |

TelegramSignInButton props

| Prop | Type | Default | Description | |---|---|---|---| | onClick | () => void | — | Click handler | | disabled | boolean | — | Disables the button | | lang | "en" \| "ru" | "en" | Label language | | title / label | string | — | Override button text | | fullSize | boolean | — | Stretch to full width | | className | string | — | Extra CSS class |

Toasts

Mount <Toaster /> once at the root of your app, then call useToaster anywhere.

import { Toaster, useToaster } from "@vervstack/chures";

// in your root layout
<Toaster />

// anywhere in your app
const { bake } = useToaster();

bake({ title: "Saved", description: "Your changes were saved.", level: "Info" });
bake({ title: "Error", description: "Something went wrong.", level: "Error", isDismissable: true });

Toasts auto-dismiss after 5 seconds. Set isDismissable: true to show a close button.

Toast fields

| Field | Type | Default | Description | |---|---|---|---| | title | string | — | Toast heading (also used as unique key) | | description | string | — | Body text | | level | "Info" \| "Warn" \| "Error" | "Info" | Visual severity | | isDismissable | boolean | false | Show manual dismiss button |

CSS theming

Override these CSS custom properties to match your design:

| Variable | Default | Meaning | |---|---|---| | --ta-accent | #229ED9 | Info border color | | --ta-error | #ef4444 | Error border + title color | | --ta-warn | #f59e0b | Warning border + title color | | --ta-fg | #ffffff | Title text color | | --ta-fg-muted | #9ca3af | Description text color | | --ta-font-sm | 0.875rem | Title font size | | --ta-font-xs | 0.75rem | Description font size |

License

MIT