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

starlight-shadcn

v0.1.0

Published

shadcn + React Aria theme for Starlight on Astro 7

Readme

starlight-shadcn

A complete Starlight theme by jagreehal — shadcn/ui design tokens + React Aria on Astro 7.

Overrides all 28 overridable Starlight components.

Install

pnpm add starlight-shadcn
// astro.config.mjs
import starlight from '@astrojs/starlight';
import starlightShadcn from 'starlight-shadcn';

export default defineConfig({
  integrations: [
    starlight({
      customCss: ['./src/styles/global.css'],
      plugins: [starlightShadcn()],
    }),
  ],
});

Bring your own palette

The theme defines no colour tokens. It maps whatever you define onto Starlight's --sl-* variables, so the palette is entirely yours — paste any theme from ui.shadcn.com/create into your global.css exactly as generated:

@custom-variant dark (&:is(.dark *));

:root {
  --background: oklch(1 0 0);
  /* ...light tokens */
}

.dark {
  --background: oklch(0.145 0 0);
  /* ...dark tokens */
}

Starlight tracks the theme with data-theme on <html> while shadcn uses a .dark class. The ThemeProvider override sets that class in a render-blocking inline script, so the right palette is applied on the first frame with no flash.

Prose rhythm doesn't break your layouts

Starlight spaces prose with a descendant selector:

.sl-markdown-content :not(a, strong, …) + :not(a, strong, …) { margin-top: 1rem; }

Because it matches at any depth, every child after the first inside a container you wrote picks up a top margin — which silently breaks flex and grid rows and leads to hand-written .my-row > * { margin-top: 0 } patches.

This theme clears it for flex and grid containers, which space themselves with gap, so rows stay aligned with no extra classes:

<div class="flex flex-wrap gap-2">
  <Button client:load>Default</Button>
  <Button client:load variant="outline">Outline</Button>
</div>

Normal prose spacing is untouched — a plain <div> still gets the rhythm. For a container styled without Tailwind's display utilities, Starlight's own class="not-content" escape hatch still works.

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | overrides | ComponentName[] | all 28 | Subset of Starlight components to override. | | warnOverrides | boolean | true | Warn when an override is already set in your config. | | collapsibleSidebar | boolean | true | Desktop (≥50rem) collapsible sidebar with hover peek. | | clerkToc | boolean | true | Clerk-style SVG track on the desktop table of contents. | | pageActions | boolean \| { markdownUrl?: string } | true | Copy Markdown + Open in ChatGPT/Claude/Cursor beside the page title. Copy works from the page body; { markdownUrl } adds View as Markdown. | | fonts | boolean | true | Inject Geist Sans + Geist Mono as --font-geist / --font-geist-mono fallbacks. Pasted --font-sans always wins. | | palettes | { value, label }[] | [] | Extra palettes offered beside the light/dark toggle. | | navLinks | { label, href, activeMatch?, translations? }[] | [] | Top-level links beside the site title. |

starlightShadcn({
  overrides: ['Header', 'ThemeSelect', 'Hero'], // only these
});

See the Plugin API reference for the rest.

Translations

Strings the theme adds beyond Starlight's own are prefixed starlightShadcn. and translate like any Starlight UI string. Only English ships; untranslated locales fall back to it.

Hero button variants

Extend the docs schema to use shadcn button variants in splash-page hero actions:

// src/content.config.ts
import { docsSchema } from '@astrojs/starlight/schema';
import { ExtendDocsSchema } from 'starlight-shadcn/schema';

export const collections = {
  docs: defineCollection({ schema: docsSchema({ extend: ExtendDocsSchema }) }),
};
hero:
  actions:
    - text: Get Started
      link: /guides/getting-started/
      variant: default # default | secondary | outline | ghost | destructive | link

Requirements

  • Astro ^7
  • @astrojs/starlight >=0.41.4

License

MIT © jagreehal