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

@samjurnio_/gc-ui

v0.2.0

Published

A lightweight GoCardless-flavoured React component kit for interview practice — Button, StatusBadge, DataTable, FilterTabs, AppShell and more. Unofficial; not affiliated with GoCardless.

Readme

@samjurnio_/gc-ui

A lightweight, GoCardless-flavoured React component kit for interview practice. Tokens (colours, type, radii) are sampled from the real dashboard at manage.gocardless.com, so what you build in practice looks like what you'll build in the interview.

Zero build step. The components are authored with React.createElement, so the package runs as-is in Vite, Vitest and Sandpack — no JSX transform or bundler config needed. React is a peer dependency; nothing else.

Unofficial. This is a personal practice kit. It is not affiliated with, endorsed by, or produced by GoCardless; it only mirrors the general look-and-feel. "GoCardless" is a trademark of its owner.

Install

Once published:

npm install @samjurnio_/gc-ui

Or install the local tarball / source without publishing:

npm install ./gc-ui-0.1.0.tgz
npm install ./gc-ui

Then import the stylesheet once in your app entry (e.g. main.jsx):

import '@samjurnio_/gc-ui/styles.css'

Quick start

import { PageHeader, Button, DataTable, StatusBadge, formatMoney, PlusIcon } from '@samjurnio_/gc-ui'
import '@samjurnio_/gc-ui/styles.css'

const columns = [
  { key: 'reference', header: 'Reference' },
  { key: 'customer',  header: 'Customer' },
  { key: 'amount',    header: 'Amount', align: 'right', render: (p) => formatMoney(p.amount, p.currency) },
  { key: 'status',    header: 'Status', render: (p) => <StatusBadge status={p.status} /> },
]

export default function App({ payments }) {
  return (
    <>
      <PageHeader title="Payments" actions={<Button iconRight={<PlusIcon />}>Create payment</Button>} />
      <DataTable columns={columns} rows={payments} rowKey="id" />
    </>
  )
}

Full composed examples: a payments dashboard (sidebar + tabs + search + table + pagination + empty state) in example/PaymentsDashboard.jsx; the Events list (skeleton loading → table → cursor pagination) in example/EventsPage.jsx; and an event detail page in example/EventDetail.jsx.

Components

| Component | Key props | |---|---| | Button | variant (primary | accent | secondary | ghost | link), size (md | sm), iconLeft, iconRight, fullWidth, plus all <button> props | | Badge | tone (success | warning | info | danger | neutral), dot | | StatusBadge | status — maps a raw payment/mandate status to a labelled, coloured pill | | FilterTabs | items: [{ key, label, count? }], value, onChange(key) | | SearchInput | value, onChange(string), placeholder | | PageHeader | title, subtitle, actions | | Toolbar | left, right (the filter/actions row) | | DataTable | columns: [{ key, header, align?, width?, render?(row) }], rows, rowKey, onRowClick(row), empty | | TableSkeleton | columns, rows — the loading state for a DataTable (shimmer rows, matches the Events page) | | Pagination | pageSize, pageSizeOptions, onPageSizeChange(n), hasPrev, hasNext, onPrev, onNext — cursor-style prev/next + "Items per page" (matches the dashboard footer) | | DetailList | items: [{ label, value }], columns — key/value grid for detail pages (event / payment detail) | | Card | pad | | Skeleton | width, height, radius — shimmer placeholder | | LoadingState / ErrorState / EmptyState / Spinner | see below | | AppShell / Sidebar / NavItem | dashboard chrome | | Icons | SearchIcon, FunnelIcon, PlusIcon, ChevronDown, ChevronLeft, ChevronRight, MoreVertical, DownloadIcon, UploadIcon, BellIcon, GearIcon, HomeIcon, CardIcon, UsersIcon, CoinIcon | | Utils | formatMoney(minor, currency), toMinorUnits(str), statusMeta(status) |

ErrorState takes { title?, message?, onRetry? }; EmptyState takes { icon?, title, description?, action? }.

Theming

Everything is driven by CSS variables in gc-ui/tokens.css. Override any of them in your own :root to re-skin — e.g. to shift the accent:

:root { --gc-accent: #d8f24a; --gc-radius: 10px; }

Using it in your tests

The pure helpers ship with unit tests (npm test in this package). In your project (which already has the React plugin), test components against the kit with React Testing Library:

import { render, screen } from '@testing-library/react'
import { StatusBadge, DataTable } from '@samjurnio_/gc-ui'

test('renders a status pill', () => {
  render(<StatusBadge status="paid_out" />)
  expect(screen.getByText('Paid out')).toBeInTheDocument()
})

test('renders a row per payment', () => {
  render(<DataTable rowKey="id"
    columns={[{ key: 'reference', header: 'Ref' }]}
    rows={[{ id: '1', reference: 'INV-1' }, { id: '2', reference: 'INV-2' }]} />)
  expect(screen.getAllByRole('row')).toHaveLength(3) // header + 2
})

Note: styles aren't needed for tests (assert on roles/text, not colours). If your Vitest config sets css: false, importing gc-ui/styles.css in a component is simply ignored during tests.

Why plain React.createElement?

Publishing raw .jsx inside node_modules breaks in some setups (Vitest externalises node_modules and Node can't parse JSX). Authoring with createElement sidesteps all of that: the package is valid JavaScript that any React runtime accepts, so it "just works" wherever you install it. The public API you write is still ordinary JSX.

Publishing (maintainer)

The manifest is set up to publish a public, scoped package (@samjurnio_/gc-ui, publishConfig.access = public). If your npm username/org isn't samjunior, change the scope in package.json ("name": "@<your-scope>/gc-ui") first.

npm login                       # authenticate to your npm account
npm publish --access public     # first publish (scoped packages need --access public)

For later releases, bump the version (npm version patch|minor|major) then npm publish again — npm rejects re-publishing an existing version. Preview exactly what will ship with npm publish --dry-run or npm pack.