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

@rationalbloks/frontblok-components

v0.3.1

Published

Reusable React components for RationalBloks frontends - Auth views, Settings, Error handling, Modals, Theme

Readme

@rationalbloks/frontblok-components

MUI views and parts for RationalBloks frontends: sign-in and registration with Google Sign-In, the password reset and email verification pages, settings, support, an error boundary, a confirmation modal, a navbar factory and the theme.

A component gets everything through its props (API client, auth hook, branding, routes) and reads no app context. The API client and auth hook of @rationalbloks/frontblok-auth fit the props as they are.

Install

npm install @rationalbloks/frontblok-components

Peer dependencies: @mui/material and @mui/icons-material 5 to 7, @emotion/react, @emotion/styled, @react-oauth/google 0.12, react and react-dom 18 or 19, react-router-dom 6 or 7.

Views

| Component | Props | Does | |-----------|-------|------| | AuthView | branding, authApi, useAuth, generateOAuthNonce | Sign-in and registration, Google Sign-In | | ForgotPasswordView | authApi, authRoute? | Requests a reset link (valid one hour) | | ResetPasswordView | authApi, authRoute? | Sets the new password from the link's token | | VerifyEmailView | authApi, successRoute?, errorRoute? | Verifies the email from the link's token | | SettingsView | authApi, useAuth, homeRoute?, children? | Profile, sign out, account deletion | | SupportView | supportEmail | Opens the user's email app with the request addressed to supportEmail |

Shared

| Component | Props | Does | |-----------|-------|------| | ErrorBoundary | children, supportEmail | Shows ErrorFallback instead of a blank page after a render error | | ErrorFallback | error, errorInfo, resetError, supportEmail | The error page itself | | ConfirmationModal | open, onClose, onConfirm, title, message, ... | Asks before an action | | createNavbar(config) | brand, navigation, useAuth, gradient | Returns the app's navbar component | | createAppTheme(options?) | palette, typography, components, border radius overrides | The MUI theme |

Usage

import {
  AuthView,
  ForgotPasswordView,
  ResetPasswordView,
  VerifyEmailView,
  SupportView,
  ErrorBoundary,
} from '@rationalbloks/frontblok-components';
import { authApi, useClientAuth, generateOAuthNonce } from './services/datablokApi';
import { BRANDING } from './config/branding';

function App() {
  return (
    <ErrorBoundary supportEmail="[email protected]">
      <Routes>
        <Route path="/auth" element={
          <AuthView branding={BRANDING} authApi={authApi} useAuth={useClientAuth} generateOAuthNonce={generateOAuthNonce} />
        } />
        <Route path="/forgot-password" element={<ForgotPasswordView authApi={authApi} />} />
        <Route path="/reset-password" element={<ResetPasswordView authApi={authApi} />} />
        <Route path="/verify-email" element={<VerifyEmailView authApi={authApi} successRoute="/dashboard" />} />
        <Route path="/support" element={<SupportView supportEmail="[email protected]" />} />
      </Routes>
    </ErrorBoundary>
  );
}

Branding

export const BRANDING = {
  appName: 'My App',
  tagline: 'Welcome',
  logoLetter: 'M',
  primaryGradient: 'linear-gradient(135deg, #1e40af 0%, #2563eb 100%)',
  primaryGradientHover: 'linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%)',
  logoShadow: '0 4px 20px rgba(30, 64, 175, 0.3)',
  dashboardRoute: '/dashboard',
  messages: {
    loginSuccess: 'Signed in.',
    registerSuccess: 'Account created.',
  },
  securityBadge: 'Secure Access',
};

License

MIT