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

mokai-themes

v0.6.1

Published

Themes for the Mokai code editor

Readme

mokai-themes

npm version license

Theme collection for the tiny Mokai web code editor (and its companion highlighter mokai-syntax). It ships a single stylesheet (styles.css) with a small set of class‑based themes you can opt into. No JavaScript, no build step – just drop the CSS and add a class.

Install

Install using a package manager

Install using npm or yarn:

# install using npm
$ npm install mokai mokai-themes

# install using yarn
$ yarn add mokai mokai-themes

Install using a CDN

You can also use it directly in the browser via a CDN like unpkg:

<link rel="stylesheet" href="https://unpkg.com/mokai-themes/styles.css">

Available themes

| Class name | Style intent / notes | |-------------------|----------------------| | mokai-light | Neutral light, subtle colors | | mokai-dark | Default dark variant | | mokai-monoblue | Light, blue‑tinted, bold keywords | | mokai-one-light | Inspired by VS Code One Light | | mokai-one-dark | Inspired by VS Code One Dark |

All themes define colors for editor UI (background, foreground, line numbers, scrollbars) plus token classes produced by mokai-syntax (e.g. token-keyword, token-string, token-comment, etc.).

Basic usage with Mokai editor

<link rel="stylesheet" href="https://unpkg.com/mokai/styles.css">
<link rel="stylesheet" href="https://unpkg.com/mokai-themes/styles.css">
<div id="editor"></div>
<script type="module">
	import mokai from "https://unpkg.com/mokai/index.js";
	import highlight from "https://unpkg.com/mokai-syntax/index.js"; // optional

	const editor = mokai(document.getElementById("editor"), {
		className: "mokai-dark",   // pick any theme class
		language: "javascript",
		highlight: highlight,
	});
	editor.setCode("console.log('Hello Mokai');\n");
</script>

If you installed via npm, import the CSS through your bundler / framework:

import "mokai/styles.css";       // core editor structural styles (if packaged there)
import "mokai-themes/styles.css"; // theme definitions

Token classes

The themes color these token classes (non‑exhaustive list):

token-attr, token-attribute, token-bullet, token-code, token-comment, token-constant,
token-emphasis, token-keyword, token-link, token-number, token-operator, token-punctuation,
token-quote, token-section, token-selector-attr, token-selector-class, token-selector-id,
token-selector-pseudo, token-selector-tag, token-string, token-title.function, token-unit,
token-strong

You can override any of them later in your own CSS after importing the theme file.

Customizing / extending a theme

Easiest approach: append overrides after the import.

/* After importing mokai-themes/styles.css */
.mokai-dark .token-string { color: #8bd49c; }
.mokai-dark .token-keyword { font-weight: 600; }

Creating a new theme (example: high‑contrast):

.mokai-high-contrast {
	background:#000; color:#fff;
}
.mokai-high-contrast .mokai-lines { color:#666; }
.mokai-high-contrast .token-keyword { color:#ff8a00; }
.mokai-high-contrast .token-string { color:#00ff99; }
.mokai-high-contrast .token-comment { color:#7f7f7f; font-style:italic; }
/* add other tokens as needed */

Then just pass className: "mokai-high-contrast" when creating the editor.

File size & performance

Only a single CSS file; the cost is minimal. Remove unused theme blocks with a CSS tree‑shaker (e.g. PurgeCSS) if you only ship one theme to production.

FAQ

Do I have to use these themes?
No. They’re optional helpers. You can write your own from scratch; just replicate the structure of .mokai-<name> and style the token classes.

Why not ship each theme as a separate file?
Simplicity and small raw size. If you prefer separate files you can manually split them or copy only the blocks you use.

Will you add more themes?
Possibly, but the goal is to stay minimal. PRs for small, broadly useful themes are welcome.

License

Under the MIT License.

Found a color mismatch or want to propose an improvement? Open an issue / PR.