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

@writechoice/components

v0.5.0

Published

Portable WriteChoice MDX components (framework-agnostic React + a single stylesheet).

Readme

@writechoice/components

Portable, framework-agnostic React components extracted from the WriteChoice Docusaurus template. They work in any project that renders React inside .md/.mdx (Docusaurus, Next.js, Vite, Astro, etc.) — no Docusaurus runtime required.

Install

npm install @writechoice/components

Peer dependencies: react and react-dom (>=18).

Usage

Import the single stylesheet once (e.g. in your app root / MDX provider):

import "@writechoice/components/styles.css";

Then use the components:

import { Callout, Steps, CardList, Accordion } from "@writechoice/components";

Docusaurus (one-line setup)

In Docusaurus you can skip the manual CSS import and MDX registration. Just add the bundled plugin to docusaurus.config.js:

plugins: ['@writechoice/components/docusaurus'],

It auto-loads the stylesheet and registers every component globally, so you can use <Callout>, <Steps>, <Card>, etc. in any .mdx with no imports. The plugin is optional and Docusaurus-only — it adds no dependency and other bundlers (Vite, Next, …) never load it.

It also applies default table styles (full-width, horizontal scroll). To turn them off, pass an option:

plugins: [
  ['@writechoice/components/docusaurus', { tableStyles: false }],
],

Outside Docusaurus, the table styles are opt-in:

import "@writechoice/components/tables.css";

Theming

The stylesheet already ships sensible default design tokens (theme.css), so components render correctly with no extra setup. To re-theme, override any token in your own :root (loaded after the package styles):

:root {
  --primary-color: #6b5bff;
}

Dark mode

Dark variants are defined under [data-theme="dark"] (same convention as Docusaurus). Toggle dark mode by setting that attribute on <html>:

document.documentElement.setAttribute("data-theme", "dark");

Components included (portable set)

| Component | Notes | |-----------|-------| | Accordion / AccordionGroup | Collapsible content (<details> based). | | Callout | type: info, tip/success, warning, danger, note, transpara, support, training. | | Card | Card with an icon or image (title, description, icon, image/imageDark, link, compact). Swaps imageDark in dark mode. | | CardList | Grid container (cols prop). Render Card/BadgeCard/APICard children inside. | | BadgeCard | Card with a badge/tag in the header (title, tag, description, link). | | APICard | Card with a colored HTTP method tag (title, method/type, description, link). | | Image | Responsive image (src, srcDark, width/size, border, noShadow). Swaps srcDark in dark mode. | | Video | Video player — direct MP4 or YouTube embed (src, width, autoPlay, alt). | | Request / Response | Titled, syntax-highlighted code example (title; code as child). | | CodeBlock | Standalone code block with highlighting + copy button (language, title). | | Steps | Numbered steps from heading children (titleSize, hideNumbers). | | DownloadButton | File download button (title, url, icon). | | Parameter | API parameter doc (name, type, required, default). | | Checklist | Interactive checklist, persisted to localStorage. | | Hint | Hover tooltip (hint, placement). | | Searchbar | Client-side filter/highlight wrapper for tables/cards/accordions. | | Feedback | Floating feedback form (uses EmailJS — keys are hardcoded; edit Feedback.jsx to use your own). |

Notes / differences from the Docusaurus version

  • All @docusaurus/*, @site/* and @theme/* couplings were removed.
  • DownloadButton/icons: useBaseUrl was dropped — image icon paths are used as-is, so pass absolute or already-resolved paths.
  • Feedback was converted from a CSS Module to plain (namespaced) classes so it fits the single-stylesheet model.
  • Per-component import "./x.css" were removed in favor of the single styles.css entry.
  • Base design tokens that used to come from the Docusaurus theme (Infima + custom.css) are now shipped as defaults in theme.css.
  • Callout backgrounds/borders were painted by Infima's .alert class in Docusaurus; those rules are now self-contained in callouts.css.
  • Cosmetic only: heading/parameter hash-link anchor icons (the link-on-hover glyph) came from the Docusaurus theme and are not included — the anchors still work, they're just not shown as an icon.
  • Card/Image dark-mode image swapping used useColorMode; it now uses a small portable hook that reads data-theme on <html> (no provider needed).
  • BadgeCard/APICard/Card @docusaurus/Link became a plain <a href>, and useBaseUrl was dropped (asset paths are used as-is).
  • Request/Response: in Docusaurus these rendered into a side panel synced to the page scroll (via a TOC override + site context). That panel doesn't exist outside the site, so they now render inline as titled, highlighted code blocks (powered by prism-react-renderer).

All components from the template are now ported — nothing is left behind.