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

aixbet-games-ui

v1.8.4

Published

> npm install [email protected]

Readme

Getting Started

npm install [email protected]

Usage

Example 1: AppContainer, Header, and Main

import { AppContainer, Header, Main, Navbar } from "aixbet-games-ui";
import "aixbet-games-ui";

export default function AppLayout({ children }) {
  return (
    <AppContainer>
      <Header
        balanceDiamond={1000}
        balanceUsd={10}
        balanceType="diamond"
        setBalanceType={setBalanceType}
      />
      <Main>{children}</Main>
    </AppContainer>
  );
}

Example 2: BetAmount and BetButton

import { BetAmount, BetButton } from "aixbet-games-ui";
import { useState } from "react";

export default function Home() {
  const [betAmount, setBetAmount] = useState(100);

  return (
    <>
      <BetAmount
        betAmount={betAmount}
        setBetAmount={setBetAmount}
        balanceType="diamond"
      />
      <BetButton />
    </>
  );
}
 <Frame
      gameControl={<GameControl/>}
    >
 	<Games />
 </Frame>

Components and Types

  • AppContainer: A wrapper component for your app layout.

    • Props:
      • children: ReactNode, the child components to be wrapped.
      • className?: Optional string for additional CSS classes.
      • isProduction?: Boolean flag to indicate if the environment is production.
  • Main: Used to wrap the main content inside the layout.

    • Props:
      • children: ReactNode, the content inside the main layout.
      • className?: Optional string for additional CSS classes.
  • Header: Displays the user’s balance with toggle support for currency type.

    • Props:
      • balanceDiamond: A string or number representing the balance in diamonds.
      • balanceUsd: A string or number representing the balance in USD.
      • balanceType: Enum ("diamond" | "usd"), current selected balance type.
      • setBalanceType: Function to update the balance type.
      • className?: Optional string for additional CSS classes.
  • BetAmount: Input for setting the bet amount.

    • Props:
      • betAmount: A number representing the current bet amount.
      • setBetAmount: A function to update the bet amount, passed as Dispatch<SetStateAction<number>>.
      • disabled?: A boolean to disable the input.
      • setInputOnFocus?: Function to track input focus state.
      • balanceType: Enum ("diamond" | "usd"), determines the currency type.
  • BetButton: A button to place or cash out a bet.

    • Props:
      • cashoutAmount?: An optional number representing the cashout amount.
      • disabled?: A boolean to disable the button.
      • Other props extend ButtonHTMLAttributes<HTMLButtonElement> for additional control.
  • Error: Displays error messages with an action refresh button.

    • Props:
      • title?: Optional string for the error title.
      • desc?: Optional string for the error description.
      • onClick?: Function triggered when the refresh button is clicked.
  • AnimatedNumber: Displays an animated number transition.

    • Props:
      • from?: Optional starting number.
      • to: Number to animate towards.
      • duration?: Animation duration in milliseconds.
      • balanceType?: Enum ("diamond" | "usd"), determines currency display.
      • className?: Optional string for additional CSS classes.
  • Utility Functions:

    • currencyFormat(input: string | number, precision?: number): Formats a number into a currency string.
    • CurrencyFormatInput(value: string | number): Returns a formatted currency string.
    • requestVibrate(): Triggers a device vibration.
    • usePreviousBalance(value: number): Hook to store the previous balance value.
  • Miscellaneous Components:

    • ModalLoading: Displays a loading modal.
    • FullLoading: Displays a full-screen loading indicator.
    • PreventNonMobile: Restricts app access to mobile devices.

Tailwind CSS

Import the Tailwind CSS styles:

import "@bullspin/p4l-games-ui/tailwind.css";

License

MIT License.