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

react-tally

v0.0.9

Published

Inofficial wrapper Form Tally Forms to use easily with React

Downloads

395

Readme

React Tally Wrapper

A lightweight React wrapper for embedding Tally.so forms with ease.
Supports all Tally embed features, event listeners, and customization options via props.

Features

  • ✅ Easy integration of Tally forms in React, Astro and Next.js apps
  • 🎯 Event handlers for form load, page view, and submission
  • 🪄 Utility methods and hooks to work with the Tally widget and session
  • 💥 TypeScript ready

Installation

npm install react-tally
# or
bun add react-tally

Usage

As an embed

import { TallyForm } from 'react-tally';

function MyPage() {
	return (
		<TallyForm
			formId="YOUR_FORM_ID"
			onFormLoad={(event) => console.log('Form loaded', event)}
			onPageView={(event) => console.log('Page viewed', event)}
			onSubmission={(event) => console.log('Form submitted', event)}
			style={{ width: '100%', height: '500px' }}
		/>
	);
}

Props

All standard <iframe /> props are supported.
In addition, the following are available:

| Prop | Type | Description | | ---------------- | --------------------------------------- | --------------------------------- | | formId | string | Required. Your Tally form ID. | | onFormLoad | (event: TallyLoadedEvent) => void | Triggered when form is loaded. | | onPageView | (event: TallyPageViewEvent) => void | Triggered on page change. | | onSubmission | (event: TallySubmissionEvent) => void | Triggered when form is submitted. |

As a popup

import { useTallyPopup } from 'react-tally';

function MyPage() {
	const { open, close } = useTallyPopup('YOUR_FORM_ID');

	return (
		<div>
			<button onClick={() => open()}>Open</button>
			<button onClick={() => close()}>Close</button>
		</div>
	);
}

The open() function may take additional configuration options:

type TallyPopupOptions = {
	key?: string; // This is used as a unique identifier used for the "Show only once" and "Don't show after submit" functionality
	layout?: 'default' | 'modal';
	width?: number;
	alignLeft?: boolean;
	hideTitle?: boolean;
	overlay?: boolean;
	emoji?: {
		text: string;
		animation:
			| 'none'
			| 'wave'
			| 'tada'
			| 'heart-beat'
			| 'spin'
			| 'flash'
			| 'bounce'
			| 'rubber-band'
			| 'head-shake';
	};
	autoClose?: number; // in milliseconds
	showOnce?: boolean;
	doNotShowAfterSubmit?: boolean;
	customFormUrl?: string; // when you want to load the form via it's custom domain URL
	hiddenFields?: {
		[key: string]: any;
	};
	onOpen?: () => void;
	onClose?: () => void;
	onPageView?: (page: number) => void;
	onSubmit?: (payload: TallySubmissionPayload) => void;
};

Utility Hooks and Functions

You can also use these utilities:

import {
	// Hooks
	useTally,
	useTallyEvents,

	// Functions
	getFormData,
	getFormSession,
} from 'react-tally';
  • getFormData(formId: string): TallyFormData | undefined
    Fetch metadata about a given form.

  • getFormSession(formId: string): string | undefined
    Access current session ID for a specific form.

  • useTally(): void
    Injects the Tally popup widget script.

  • useTallyEvents(formId:string, { onFormLoad, onPageView, onSubmission }: TallyEventHandlers): void
    Tally form event listeners for a specified form.

  • useTallyEvents({ onFormLoad, onPageView, onSubmission }: TallyEventHandlers): void
    Tally form event listeners for all Tally events.


License

MIT


Credits

Based on the Tally.so Developer Resources.