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

@playableintelligence/claim-react

v0.1.4

Published

React components for Open Game Protocol rewards system

Readme

@opusgamelabs/claim-react

React components for Open Game Protocol rewards system.

Installation

npm install @opusgamelabs/claim-react

Usage

1. Import the Styles

IMPORTANT: You must import the CSS file in your application for the components to be styled correctly.

Add this import at the top level of your application (e.g., in your main App.tsx or index.tsx):

import '@opusgamelabs/claim-react/styles.css';

Note: The styles are scoped to avoid conflicts with your application's styles. All Tailwind utilities use the ogp- prefix, and font declarations are scoped within the component wrapper. This ensures the package won't override your existing Tailwind configuration or custom styles.

2. Use the Components

import { OGPClaimProvider, OGPClaimButton } from '@opusgamelabs/claim-react';

function App() {
  return (
    <OGPClaimProvider>
      <OGPClaimButton />
    </OGPClaimProvider>
  );
}

Styling

This package includes:

  • Tailwind CSS - All Tailwind utility classes used by the components
  • Custom Theme - Pre-configured color palette, fonts, and animations
  • Custom Fonts - PPNeueMontreal font family (Regular, Medium, Bold)
  • Dark Mode Support - Automatic dark mode styling with the dark class

Theme Colors

The package includes a comprehensive color system:

Light Mode:

  • Background: bg-site-light-background
  • Panel: bg-site-light-panel
  • Text: text-site-light-text-primary, text-site-light-text-secondary
  • Accent: text-site-light-accent-blue, text-site-light-accent-green

Dark Mode:

  • Background: bg-site-dark-background
  • Panel: bg-site-dark-panel
  • Text: text-site-dark-text-primary, text-site-dark-text-secondary
  • Accent: text-site-dark-accent-blue, text-site-dark-accent-green

Custom Fonts

The package includes the PPNeueMontreal font family:

  • font-neue - Regular weight
  • font-neue-medium - Medium weight
  • font-neue-bold - Bold weight

Animations

Pre-configured animations:

  • animate-slide-up - Slide up with fade in
  • animate-slide-down - Slide down with fade out
  • animate-fade-in - Fade in
  • animate-fade-out - Fade out

API Reference

Components

  • OGPClaimProvider - Context provider for claim functionality
  • OGPClaimButton - Pre-built claim button component
  • OGPClaimModal - Modal component for claims
  • ClaimModal - Pre-built claim modal screen
  • LoginModal - Pre-built login modal screen
  • LoadingModal - Pre-built loading modal screen
  • NoRewardsModal - Pre-built no rewards modal screen

Hooks

  • useOGPClaim - Access claim context and state
  • useClaimRewards - Hook for claiming rewards
  • usePlayerRewards - Hook for fetching player rewards

Types

See the TypeScript definitions for complete type information.

Development

Building

npm run build

This will:

  1. Compile CSS with Tailwind (minified)
  2. Compile TypeScript to JavaScript
  3. Copy font files to dist

Cleaning

npm run clean

License

See LICENSE.md