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

@hipaymn/miniapp-ui-library

v1.1.8

Published

HiPay mini app UI library

Readme

@hipaymn/miniapp-ui-library

React components for HiPay mini apps.

Install

yarn add @hipaymn/miniapp-ui-library

Peer dependencies: React 19, React DOM 19, and React Router 7.

Setup

Import the stylesheet once, and wrap the app with BrowserRouter and ToastProvider. Header uses React Router, so it must render inside a router.

import { BrowserRouter } from "react-router-dom";
import { ToastProvider } from "@hipaymn/miniapp-ui-library";
import "@hipaymn/miniapp-ui-library/style.css";

export function App() {
  return (
    <BrowserRouter>
      <ToastProvider>
        <YourScreen />
      </ToastProvider>
    </BrowserRouter>
  );
}

The theme font is Manrope. It is loaded by the stylesheet.

Layout

Layout fills the screen. header stays at the top and footer stays at the bottom.

import { Button, Header, Layout } from "@hipaymn/miniapp-ui-library";

<Layout
  header={<Header title="HiPay" />}
  footer={<Button text="Continue" variant="secondary" className="w-full" />}
>
  <p>Screen content</p>
</Layout>

Header props:

| Prop | Description | | --- | --- | | title | Centered title. Required. | | isArrowLeft | Shows the back button. Defaults to true. | | handleBack | Called when the back button is pressed. | | leftIcon | Image URL for the button on the right. | | handeClickLeftIcon | Called when that button is pressed. |

Button

The standard button is 48px tall with a 24px corner radius. secondary uses the dark gradient, a 20px drop shadow, and a 40px background blur.

<Button text="Continue" variant="secondary" className="w-full" onClick={submit} />
<Button text="Saving" variant="primary" loading className="w-full" />
<Button text="Back" variant="transparent" isRightIcon={false} />

variant is "primary", "secondary", or "transparent". A white arrow shows on the right by default. Set isRightIcon={false} to hide it, or rightIconColor="black" for the dark arrow. loading keeps the label and shows Spinner beside it. leftIcon and rightIcon are image URLs.

ghost, outline, default, destructive, and link are also available for icon and text buttons that do not use the HiPay label and arrow.

Input

Boxed field with a floating label. Pass currency to show a symbol in front of a grouped amount. onChange still receives the raw digits, such as "20000".

<Input label="Үнийн дүн" currency="₮" value={amount} onChange={handleAmount} />
<Input label="Утасны дугаар" editable error="Буруу дугаар" />

label is optional. editable shows a pencil icon. rightIcon replaces that icon.

MainInput

Underline field. onChange receives the string value.

<MainInput
  label="Утас"
  value={phone}
  prefix={<span>+976</span>}
  onChange={setPhone}
/>

<MainInput label="Нууц үг" isPassword value={password} onChange={setPassword} />
<MainInput label="Нэр" value={name} error="Буруу утга" onChange={setName} />

The label sits on the line when the field is empty, and moves above the border when the field is focused or filled. labelAlwaysOnTop keeps it above the border. isLoading shows a spinner.

Toast

Call useToast() inside ToastProvider.

const { show } = useToast();

show.success("Payment successful", 3000);
show.error("Payment failed");
show({ message: "Check the amount", variant: "warning", title: "Анхааруулга" });

show.success, show.error, show.warning, and show.info take a message and an optional duration in milliseconds.

Spinner

<Spinner />
<Spinner size="large" color="#22272C" />
<Spinner size={24} animating={false} />

size is "small", "large", or a pixel number. The default color is #FF3B63.

Other components

The package also exports the rest of the UI set, including Tabs, Sheet, Dialog, Calendar, Select, Card, and Sidebar. Import them from the package root:

import { Sheet, SheetContent, SheetTrigger, Calendar } from "@hipaymn/miniapp-ui-library";

Local preview

yarn dev
yarn build