DocuKit Documentation

A clean, framework-free documentation site and API reference. Everything you need to ship beautiful developer docs — no build step required.

v2.4.0 MIT License 12.4k ★
Getting Started

Introduction #

DocuKit gives you a complete documentation site out of the box — a sticky sidebar, a content column, a mini table of contents, and beautifully styled code blocks. Built with semantic HTML5, CSS custom properties, and vanilla JavaScript.

Every section is anchored, every code block is copy-ready, and the whole layout adapts from a large desktop monitor down to a phone. No frameworks, no dependencies, no build tools.

  • ⚡
    Zero build stepOpen index.html and go.
  • 🌀
    Design tokensColors, fonts and spacing as CSS variables.
  • ⚛
    Copy buttonsOne click copies any code snippet.
  • 🔎
    Instant searchFilters the sidebar as you type.
The DocuKit documentation template rendered in a browser with a sidebar, content column and code blocks

📷 DocuKit renders a full docs site with sidebar navigation, syntax-highlighted code and an API table.

Quick start

Clone the template, open it in your editor, and start writing. Here is the fastest way to get a local preview running:

terminal
# clone the template
git clone https://github.com/uiuxlabz/docukit.git
cd docukit

# serve it locally
npx serve . -l 3000
# open http://localhost:3000
New to DocuKit? Start here — this page walks through installation, usage, components, theming and the API reference in order.
Getting Started

Installation #

Install DocuKit with your package manager of choice. Because it is framework-free, you only copy two files — style.css and main.js — into your project.

npm

terminal
npm install docukit

yarn

terminal
yarn add docukit

pnpm

terminal
pnpm add docukit

Scaffold a new docs site with the CLI

terminal
npx docukit init my-docs
cd my-docs
npx docukit dev
Prefer a single file? Grab assets/css/style.css and drop it in — the template works with a plain link tag and one script tag.
Getting Started

Usage #

Wire up the stylesheet and script, then write your sections. The sidebar, mini-TOC and search all activate from a few lines of markup.

Link the assets

index.html
<head>
  <link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
  <!-- … docs layout … -->
  <script src="assets/js/main.js"></script>
</body>

Initialize the sidebar

Give each section an id, then link to it from the sidebar. DocuKit keeps the active link in sync as you scroll.

index.html
<aside class="docs-sidebar">
  <a href="#installation" class="docs-nav-link">Installation</a>
  <a href="#components" class="docs-nav-link">Components</a>
</aside>

<main>
  <section id="installation"> <!-- … --> </section>
  <section id="components"> <!-- … --> </section>
</main>

Configure options

Behavior is controlled through data-* attributes, so there is no config file to maintain.

main.js
// options passed via data attributes
const docukit({
  sidebar: 'sticky',   // sticky | overlay | off
  search:  true,         // sidebar filter on keyup
  toc:     'right',     // right mini table of contents
  smooth:  true          // animated anchor scrolling
})
Anchor IDs must be unique. Duplicate id values break sidebar highlighting and mini-TOC links.
Guide

Components #

A small library of ready-made UI components. Each one ships as markup plus a few classes — copy the snippet, drop in your content, done.

Badge Pill-shaped badge component preview

Pill Badge

A rounded pill label for statuses, counts and categories. Ships in blue, sky and neutral variants.

.tag12 lines
Stable
Avatar Circular avatar component preview

Circle Avatar

A circular avatar with status ring, initials fallback and a 24px to 96px size scale.

.avatar18 lines
Stable
Surface Rounded card surface component preview

Rounded Card

A soft-cornered surface for grouping content, with hover elevation and optional media header.

.card22 lines
Stable
Media Thumbnail media component preview

Thumbnail

A fixed-ratio image thumbnail with lazy loading, zoom-on-hover and a caption strip.

.thumb14 lines
Beta

Example — Pill badge

index.html
<span class="tag blue">New</span>
<span class="tag sky">v2.4.0</span>
<span class="tag">14 components</span>
Guide

Responsive Grid #

The layout is fluid at every size. The sidebar sticks on desktop, collapses to an overlay drawer on tablet, and the whole page stacks on phones — all driven by two breakpoints.

DocuKit responsive grid showing the documentation layout at desktop, tablet and mobile breakpoints

Desktop

> 1180px

Sticky sidebar, content column and a right-hand mini table of contents.

Tablet

721 – 980px

Sidebar collapses to an overlay drawer opened from the TOC button.

Mobile

≤ 720px

Everything stacks to a single column; search wraps to its own row.

12-column grid demo

The template uses a 12-column mental grid. This demo shows common spans — resize the window to watch them reflow.

Clamp() everywhere. Typography and spacing use clamp(), so nothing jumps between breakpoints — it scales smoothly instead.
Guide

Theming #

Every color, font and spacing value is a CSS custom property. Override the tokens in :root and the whole template restyles itself — no class surgery.

Slate#1E293B
Blue#2563EB
Sky#0EA5E9
Light#F8FAFC
White#FFFFFF
Gray#64748B
Line#E2E8F0
Code#0F172A

Customize the palette

style.css
:root {
  --slate: #1E293B;
  --blue:  #2563EB;
  --sky:   #0EA5E9;
  --gray:  #64748B;
  --code:  #0F172A;
  --font-heading: 'Sora', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;
}

Typography scale

Headings use Sora (600/700); body copy uses IBM Plex Sans (400/500). The scale is fluid, driven by clamp().

h1 · clamp(1.6rem → 2.2rem)
Build better docs.
h2 · clamp(1.4rem → 1.75rem)
A clean documentation site.
body · 1rem / 1.7
Body copy in IBM Plex Sans stays readable on any screen.
Reference

API Reference #

Every endpoint is available under https://api.docukit.dev/v2. Authentication uses a bearer token in the Authorization header.

Method Endpoint Description Auth
GET /docs List all documentation sections ✓ optional
GET /docs/:slug Fetch a single section by slug ✓ optional
POST /docs Create a new documentation section 🔒 required
PUT /docs/:slug Replace an existing section entirely 🔒 required
DELETE /docs/:slug Remove a section and its versions 🔒 required
GET /search?q=grid Full-text search across all docs ✓ optional

Example request

curl
curl https://api.docukit.dev/v2/docs \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"

Example response

200 OK · application/json
{
  "status": "ok",
  "data": [
    {
      "slug": "installation",
      "title": "Installation",
      "updated": "2026-08-30",
      "views": 12403
    }
  ],
  "pagination": { "page": 1, "limit": 20 }
}
Rate limits. Unauthenticated requests are limited to 60 per minute. Add an Authorization header to raise this to 1,000.
Reference

Accessibility #

DocuKit is built to be usable by everyone. The markup is semantic, interactive elements are keyboard-friendly, and motion is optional.

  • ✓
    Semantic landmarksHeader, nav, main, aside and footer map to the correct ARIA roles out of the box.
  • ✓
    Keyboard navigationEvery interactive control — nav, TOC drawer, copy buttons, search — is reachable and operable with Tab.
  • ✓
    Visible focus statesFocus rings are clearly styled so the active element is never lost.
  • ✓
    Reduced motionprefers-reduced-motion disables reveal animations and smooth scrolling.
  • ✓
    Color contrastThe token palette meets WCAG AA contrast on both light and code-dark surfaces.
Goal: WCAG 2.1 AA. DocuKit targets level AA conformance and includes aria-labels, aria-expanded toggles and descriptive alt text on every image.

Motion-safe guard

style.css
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}