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

do11y

v0.5.3

Published

A bare-bones tool to document Vue components.

Readme

Do11y

A bare-bones tool to document Vue components.

[!WARNING] This is a small personal project! I make a lot of component libraries for personal projects and I absolutely love, love, love writing documentation for components, and I intend for this to be a mix of some of the features I love from VitePress and Histoire. Issues and thoughts and contributions are very welcome! But it is, again, a personal project 😊

Features

Markdown components with @mdit-vue.

Customizable through the options markdownSetup and markdownCodeBlock.

Markdown files are treated as single file Vue components with the help of @mdit-vue.

Markdown routes available through do11y:routes

To include a markdown file as a route it needs to have a title and a slug (e.g. /button) in it's frontmatter, or it needs to be placed inside docs/do11y/pages.

Shiki code highlighting

Customizable through the highlighter option.

Code blocks are automatically highlighted with Shiki.

Highlight imports

You can import Vue files as highlighted code blocks through .vue?highlight, or .vue?highlight&lang=css (if you want the output to compile the style tags).

These imports return HTML strings meaning you have to render the code block using v-html.

[!WARNING] Imports of type .vue?highlight&lang=css only work on built sites. During development it will return the same result as .vue?highlight.

Sandboxes

To customize the Sandbox app add a custom docs/do11y/pages/Sandbox.vue wrapper component and/or use the setupSandbox option.

Turn a component into a sandbox by adding a .sandbox prefix to the component name, e.g. Button.sandbox.vue will be available under the url /sandbox?id=button, and when importing the component it will be wrapped inside an iframe.

[!NOTE] The id of a sandbox component is based on the filename - not the path - this means every sandbox component must have a unique name.

Sandbox Iframe

To customize the Sandbox app add a custom docs/do11y/layout/SandboxIframe.vue wrapper component.

The sandbox iframe component has some props automatically passed to it - you can use the SandboxIframeProps type to declare these.

<template>
  <iframe ref="iframe" :title="`Sandbox for ${title || id}`" :src="url" />
</template>

<script lang="ts" setup>
import type { SandboxIframeProps } from "do11y";

defineProps<SandboxIframeProps & { title?: string }>();
</script>

Document components with vue-component-meta

Document components through meta imports (Button.vue?meta) which give a simplified version of the result from vue-component-meta.

Options

Options should be the default export of docs/do11y/do11y.ts.

You can set the home page by adding a docs/do11y/pages/Home.vue file, and you can add a layout for each page in docs/do11y/layout/Page.vue using <RouterView />.

import type { Options } from "do11y";

export default {} satisfies Options;
interface Options {
  /**
   * Additional setup for the app.
   */
  setup?(app: App, router: Router): void | Promise<void>;

  /**
   * Additional setup for the sandbox app.
   */
  setupSandbox?(app: App): void | Promise<void>;

  /**
   * The code highlighter.
   *   - Markdown code blocks
   *   - `.vue?highlight`, `.vue?highlight&lang=css` & `.vue?highlight&styleless` imports
   *   - `highlightedSource` and `highlightedCssSource` props in SandboxIframe
   *
   * If using multiple themes - you can set the `data-theme` attribute
   * to switch between them, e.g. `data-theme="vitesse-light"`.
   */
  highlighter?: {
    /**
     * The available themes.
     * The default shiki themes are always included.
     */
    themes: (ThemeInput | StringLiteralUnion<BundledTheme, string>)[];

    /**
     * What the default theme should be.
     * @default "The first theme in the array"
     */
    defaultTheme?: string | StringLiteralUnion<BundledTheme, string>;

    /**
     * Custom transformers.
     *
     * These Shiki's default transformers are always included:
     *   - transformerNotationHighlight
     *   - transformerNotationDiff
     *   - transformerNotationErrorLevel
     */
    transformers?: ShikiTransformer[];

    /**
     * If comments should be filtered.
     *   - Passing `true` removes all comments
     *   - While `string[]` acts as a filter - removing comments that `include` any of these strings in them
     *   - `false` keeps all comments
     *
     * @default ["prettier-ignore"]
     */
    removeComments?: boolean | string[];

    /**
     * If any postprocessing should be done.
     * The element is a JSDOM HTMLPreElement.
     */
    postprocess?: (pre: HTMLPreElement) => void;
  };

  /**
   * Additional markdown-it setup.
   */
  markdownSetup?: PluginSimple;

  /**
   * The callback function for rendering code blocks.
   * Will default return the highlighted code generated by Shiki directly.
   */
  markdownCodeBlock?: (highlightedCode: string, md: MarkdownIt) => string;
}