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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@superfluid-finance/widget

v0.5.1

Published

Superfluid Widget is the best way to start receiving ongoing real-time payments powered by the Superfluid Protocol. This React widget library is designed to provide an easy-to-use, customizable, and versatile payment solution that can be integrated into y

Downloads

184

Readme

Superfluid Widget · npm version License: MIT Twitter Follow

Superfluid Widget is the best way to start receiving ongoing real-time payments powered by the Superfluid Protocol. This React widget library is designed to provide an easy-to-use, customizable, and versatile payment solution that can be integrated into your application in a matter of minutes.

Table of Contents

Installation

You can install the Superfluid Widget using your favorite package manager. Please note that wagmi is a required peer dependency.

NPM

npm install --save @superfluid-finance/widget wagmi viem

Yarn

yarn add @superfluid-finance/widget wagmi viem

PNPM

pnpm add @superfluid-finance/widget wagmi viem

Usage

To use the Superfluid Widget in your React application, you need to follow these simple steps:

  1. Import the necessary components and dependencies.
import { WagmiConfig } from "wagmi";
import SuperfluidWidget from "@superfluid-finance/widget";
  1. Wrap your application with WagmiConfig and include the CheckoutWidget component.
<WagmiConfig config={wagmiConfig}>
  <SuperfluidWidget
    productDetails={productDetails}
    paymentDetails={paymentDetails}
    tokenList={tokenList}
    type="dialog"
    walletManager={walletManager}
  >
    {({ openModal }) => (
      <button onClick={() => openModal()}>Open Superfluid Widget</button>
    )}
  </SuperfluidWidget>
</WagmiConfig>

Now your users can start making real-time payments using the Superfluid Widget!

Examples

You can find examples of various use cases in the examples folder of this repository. We encourage you to explore them and adapt them to your specific application's requirements.

Customization

Superfluid Widget can be easily customized to fit your application's look and feel. The widget is built using MUI, so you can customize its appearance by passing the theme object to the WagmiConfig component. You can reference the default Material-UI theme for available customization options.

import { createMuiTheme } from "@material-ui/core/styles";

const customTheme = createMuiTheme({
  palette: {
    primary: {
      main: "#ff9800",
    },
    secondary: {
      main: "#f44336",
    },
  },
});

<SuperfluidWidget theme={customTheme}>{/* ... */}</SuperfluidWidget>;

Contributing

We welcome all sorts of contributions, be it bug fixes, new features or documentation improvements. If you'd like to contribute, please follow these basic guidelines:

  1. Fork this repository and clone it to your local machine
  2. Create a new branch for your changes
  3. Make your changes and push them to your fork
  4. Create a pull request from your fork's branch to the original repository's master branch

License

The Superfluid Widget library is MIT licensed.