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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-roast-test

v1.0.56

Published

A React widget to get feedback

Readme

React Roast

A React widget to get feedback

Purpose

React Roast is an open-source app inspector that allows users to select elements on a webpage, capture their state (including screenshots), and send the details to a desired channel. This tool is useful for UI/UX testing, feedback collection, and debugging user interfaces.

DemoRoastNest.com | Growati.com

Roastnest Widget Demo

Features

✅ Select any element on a webpage
✅ Capture element position, size, and a screenshot
✅ Supports React-based frameworks like Next.js
✅ Supports self-host and customization
✅ Lightweight and easy to integrate
✅ Written in Typescript and build using rollup

Installation

npm install react-roast

or

yarn add react-roast

Local Usage

Wrap your app with WidgetProvider provided by react-roast. The provider should be in client side and mode should be set to local and onFormSubmit should be defined.

React Example

import WidgetProvider, { FormDataProps } from "react-roast";

export default function App() {
	const handleSubmit = async ({ message, screenshot }: FormDataProps): Promise<boolean> => {
		// Must return boolean value.

		try {
			// Send message to desired channel like, Slack or discord

			return true;
		} catch (e) {
			return false;
		}
	};
	return (
		<WidgetProvider mode="local" onFormSubmit={handleSubmit}>
			<Main />
		</WidgetProvider>
	);
}

NextJS App Example

"use client";

import WidgetProvider, { FormDataProps } from "react-roast";
import { ReactNode } from "react";

export default function ReactRoastProvider({ children: ReactNode }) {
	const handleSubmit = async ({ message, screenshot }: FormDataProps): Promise<boolean> => {
		// Must return boolean value.

		try {
			// Send message to desired channel like, Slack or discord

			return true;
		} catch (e) {
			return false;
		}
	};
	return (
		<WidgetProvider mode="local" onFormSubmit={handleSubmit}>
			{children}
		</WidgetProvider>
	);
}

In app/layout.tsx

export default function RootLayout({ children }) {
	return (
		<html>
			<body>
				<ReactRoastProvider>{children}</ReactRoastProvider>
			</body>
		</html>
	);
}

Widget Props

Widget Provider Props

| Property | Type | Description | | -------------- | ------------------- | -------------------------------------------------- | | mode | local or remote | Defines if the widget operates locally or remotely | | children | ReactNode | Nested components inside the provider | | disable | boolean | Disable the widget | | onFormSubmit | function | Callback function for form submission | | customize | object | Customization options |

Widget Customize Props

You can customize the widget by passing customize props with the following options:

| Property | Type | Description | | ------------------------------- | ----------------- | ------------------------------------ | | form.className | string | Custom class for the form | | form.messageInput.placeholder | string | Placeholder text for message input | | form.submitButton.label | string | Label for submit button | | form.cancelButton.label | string | Label for cancel button | | island.direction | left or right | Position of the floating button | | island.className | string | Custom class for the floating button | | island.label | string | Label for the floating button |

Form Data Props

| Property | Type | Description | | ------------ | -------- | ------------------------------------------------ | | message | string | The message input by the user. | | screenshot | Blob | The captured screenshot of the selected element. |

Contribution

Contributions are welcome! If you would like to improve react roast, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Make changes and commit them.
  4. Submit a pull request.

Please ensure your contributions align with the project’s coding standards and best practices. If You want help, contact here

License

MIT License.