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

sn-react-pack

v1.0.0-alpha.13

Published

React component library for ServiceNow — fields, forms, lists, charts, and data hooks built on MUI.

Readme

sn-react-pack

A React component library for ServiceNow — type-aware fields, record forms, lists, charts, diagrams, schedulers, and the data hooks/services that back them, all built on MUI.

Alpha. This is an early preview (1.0.0-alpha.x, published under the alpha dist-tag). The public surface (index.ts) is the supported contract, but APIs may still change before 1.0.0.

Requirements

  • React 19 and React DOM 19 — the only peer dependencies; the host app provides them.
  • The companion ServiceNow app (scope x_snrp_ui) installed on your instance. The library's metadata / access / current-user features call that app's scoped REST endpoints (/api/x_snrp_ui/rhino/*); users need the x_snrp_ui.user role. Standard CRUD/list/aggregate features use the platform Table API and work without it.

The library is designed to run inside a ServiceNow UI page (same-origin requests, session CSRF token). It is not intended for use outside an authenticated ServiceNow session.

Install

npm install sn-react-pack
# peer dependencies (if your app doesn't already have them):
npm install react react-dom

@mui/material, @mui/lab, @emotion/react, @emotion/styled, @mui/x-charts, @mui/x-data-grid, @mui/x-scheduler, @mui/x-tree-view, @xyflow/react, @dnd-kit/* and react-router-dom ship as dependencies — you don't install them separately. Only react and react-dom are peers, since the host app must provide a single React instance.

The scheduler relies on pre-release Base UI packages. If you hit version-resolution issues, mirror the overrides block from this package's package.json in your app's root package.json.

Quick start

Wrap your app in ServiceNowProvider, then use any component or hook:

import { ServiceNowProvider, useRecord } from 'sn-react-pack';

function IncidentTitle({ sysId }: { sysId: string }) {
  const { data, loading, error } = useRecord('incident', sysId);
  if (loading) return <span>Loading…</span>;
  if (error) return <span>{error.message}</span>;
  return <span>{data?.short_description}</span>;
}

export function App() {
  return (
    <ServiceNowProvider>
      <IncidentTitle sysId="<a sys_id>" />
    </ServiceNowProvider>
  );
}

Theme the library with a standard MUI ThemeProvider + createTheme — the package ships sensible defaults via styled() slots and useThemeProps, and exposes Sn* component keys for overrides.

What's inside

Fields, RecordForm / dialogs / drawers, RecordList, ConditionBuilder / FilterPanel / SegmentFilter / PeriodFilter, RecordTree, cards (AgendaCard with eyebrow, accent and imminent cue, …), charts (Counter with lookback and inverted trends, Gauge, BarChart, LineChart with multi-table sources and end labels, …), diagrams (RecordMap), schedulers, navigation (AppShell, Navbar, LeftNav), drag-and-drop composites, record views, and data hooks (useRecord, useRecords, useMergedRecords, useTimeSeries / useMultiTimeSeries, useRecordMetadata, useAccess, useCurrentUser, …). See the full inventory and live demos in the Component Explorer.

License

Apache-2.0