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

@ksvedal/docs

v0.2.1

Published

React components for browsing and rendering bundled KUT documentation.

Readme

@ksvedal/docs

React components for browsing and rendering the bundled KUT documentation.

Modifying the documentation

Modify the documentation as markdown within the docs-folder and create a pull request. When merged to main, a job will index for search, create breadcrumbs, and make another pull request.

The level 1 heading (# in markdown) will be the title of the page (that shows up in navigation and search). Only use this once per document. The path of the documentation will be the path in breadcrumbs and what will have to be provided if you want to navigate directly to a page.

Install

npm install @ksvedal/docs react react-dom @navikt/aksel-icons

@navikt/aksel-icons is a peer dependency and must be installed by the consuming app.

The host app is expected to load the design system styles it already uses before rendering these components. Import the package stylesheet in the host app so production builds do not depend on runtime style injection.

import '@ksvedal/docs/styles.css';

Basic usage

DocsPage is the simplest way to render the bundled docs with search, breadcrumbs and navigation.

import '@ksvedal/docs/styles.css';
import { DocsPage } from '@ksvedal/docs';

export function App() {
  return <DocsPage />;
}

Controlled navigation

Use the controlled API if your app wants to keep the current docs path in state or sync it with a router. DocsPage can normalize either full docs paths (/nb/start/oidc/pkce) or short refs (oidc/pkce, docs/oidc/pkce, pkce.md). If you provide lang, short refs are resolved under that language.

import { useState } from 'react';
import '@ksvedal/docs/styles.css';
import { DocsPage } from '@ksvedal/docs';

export function DocsScreen() {
  const [path, setPath] = useState('oidc/pkce');

  return (
    <DocsPage
      lang="nb"
      currentPath={path}
      onNavigate={setPath}
      editable
      startPageHeader="Kom i gang"
      startPageParagraphs={[
        'Velg et tema for å åpne dokumentasjon.',
        'Du kan også bruke søket for å hoppe direkte til en side.',
      ]}
    />
  );
}

Render a single document

Use Docs if you only need the markdown renderer for one known document.

import '@ksvedal/docs/styles.css';
import { Docs } from '@ksvedal/docs';

export function FaqPage() {
  return <Docs docPath="nb/start/faq" />;
}

Build and publish

npm run typecheck
npm run build
npm pack --dry-run
npm publish

The package publishes the dist folder only, and scoped publishes are configured as public.

Local development

Use the built-in Vite playground to test the component in this repo while developing.

npm run dev

That opens a local page where you can switch between DocsPage and Docs, change paths, and verify navigation and rendering against the bundled docs content.

If you update dependencies, the quickest sanity-check loop is:

npm run check
npm run dev

npm run check verifies that TypeScript still passes and the package still builds to dist.