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

@niledatabase/react

v5.3.0

Published

<p align="center"> <img width="1434" alt="Screen Shot 2024-09-18 at 9 20 04 AM" src="https://github.com/user-attachments/assets/20585883-5cdc-4f15-93d3-dc150e87bc11"> </p>

Readme


Nile's React SDK

This package (@niledatabase/react) is part of Nile's Javascript SDK.

Nile's React package provides:

  • 🎨 UI components for authentication, user management, and tenant management (customizable with Tailwind CSS)
  • 🪝 React hooks for authentication, user management, and tenant management functionality

You can browse all the components and explore their properties in Nile's documentation or in Storybook.

The components and hooks are designed to work best and provide a secure user experience when used with the generated routes provided by Nile's Server-Side SDK.

Nile is a Postgres platform that decouples storage from compute, virtualizes tenants, and supports vertical and horizontal scaling globally to ship B2B applications fast while being safe with limitless scale. All B2B applications are multi-tenant. A tenant/customer is primarily a company, an organization, or a workspace in your product that contains a group of users. A B2B application provides services to multiple tenants. Tenant is the basic building block of all B2B applications.

Usage

Installation

npm install @niledatabase/react

Signup / User Info page

This example uses several components to build a one-page signup / user profile example.

  • <SignedIn> component renders for authenticated users while <SignedOut> renders for un-authenticated users.
  • <SignUpForm> component shows a standard email/password signup.
  • <UserInfo /> component shows information about currently authenticated user - their image, email, name, etc.
  • <TenantSelector> component shows the current tenant, allows to switch between tenants and to create new tenants.
  • <SignOutButton /> component expires the current session
import {
SignOutButton,
SignUpForm,
SignedIn,
SignedOut,
TenantSelector,
UserInfo,
} from "@niledatabase/react";
import "@niledatabase/react/styles.css";

export default function SignUpPage() {
return (
    <div className="flex flex-col items-center justify-center min-h-screen">
    <SignedIn className="flex flex-col gap-4">
        <UserInfo />
        <TenantSelector className="py-6 mb-10" />
        <SignOutButton />
    </SignedIn>
    <SignedOut>
        <SignUpForm createTenant />
    </SignedOut>
    </div>
);
}

Social Login (SSO)

Nile-Auth supports multiple social providers. You configure and enable them in Nile console, and then simply drop-in the components. For example, for Discord authentication:

import { DiscordSignInButton } from '@niledatabase/react';

function App() {
  return (
    <div>
      <DiscordSignInButton callbackUrl="/" />
    </div>
  );
}

Customizing the components

Nile’s react package includes a CSS file that you can use to provide a nice default style to the components:

import "@niledatabase/react/styles.css";

Nile Auth components use CSS variables for theming. This means that you can override the colors and other styles by setting the CSS variables. We support the same CSS variables that Shadcn uses. You can modify them in your global.css file.

For "spot changes", you can use the className prop of a component to customize it individually:

<SignOutButton className="bg-red-500" />

Learn more

  • You can learn more about Nile and the SDK in [https://thenile.dev/docs]
  • You can find detailed code examples in our main repo
  • Nile SDK interacts with APIs in Nile Auth service. You can learn more about it in the repository and the docs