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

@lapi-os/react-toolkit

v1.0.3

Published

A set of functions, components and hooks shared by front ends

Readme

@lapi-os/react-toolkit

A shared React library providing hooks, components, and utilities for interacting with a backend API. Built on TanStack React Query, React Router, and shadcn/ui.

Installation

npm install @lapi-os/react-toolkit

Setup

Initialize the toolkit

Call loadLapiReactToolkitData once at your app entry point before rendering anything.

import { loadLapiReactToolkitData } from '@lapi-os/react-toolkit/shared'
import { QueryClient } from '@tanstack/react-query'

const queryClient = new QueryClient()

loadLapiReactToolkitData({
  host: 'https://api.example.com',
  localStorageKeys: { auth_token: 'atk' },
  queryClient,
  queryKeyPrefix: 'my-app',
})

| Option | Type | Description | |---|---|---| | host | string | Base URL of your backend API | | localStorageKeys.auth_token | string | localStorage key where the auth token is stored | | queryClient | QueryClient | Your app's QueryClient instance | | queryKeyPrefix | string | Prefix for all React Query cache keys |

Wrap your app

Wrap your root with ProviderBackendQuery to provide the QueryClient to all components:

import { ProviderBackendQuery } from '@lapi-os/react-toolkit/components'

export default function App() {
  return (
    <ProviderBackendQuery>
      <YourApp />
    </ProviderBackendQuery>
  )
}

Tailwind CSS

Add this to your app.css so Tailwind v4 picks up styles from the library:

@source "../node_modules/@lapi-os/react-toolkit/dist/**/*.js";

Styles & Theming

Import the base styles and pick a theme in your app's CSS entry point:

@import '@lapi-os/react-toolkit/ui/styles.css';
@import '@lapi-os/react-toolkit/ui/themes/lapi.css';

Three themes are available — switching is a one-line change:

| Theme | Import | Font | |---|---|---| | lapi | @lapi-os/react-toolkit/ui/themes/lapi.css | Avgard (bundled) | | labbe | @lapi-os/react-toolkit/ui/themes/labbe.css | Montserrat | | ludy | @lapi-os/react-toolkit/ui/themes/ludy.css | Nunito |

Toast notifications

Add Toaster to your root layout once to enable toasts app-wide:

import { Toaster } from '@lapi-os/react-toolkit/ui/sonner'
import { toast } from 'sonner'

// In your layout:
<body>
  {children}
  <Toaster />
</body>

// Trigger from anywhere:
toast.success('Saved')
toast.error('Something went wrong')

Documentation