Krizaka UI
Krizaka UI

Docs source

A folder of <page>.<locale>.md files becomes the page list, the nav groups, the headings and the previous / next of a documentation, in one pure function.

Web · ✓Mobile · n/aDesktop · n/aBetaTemplates
Support level
Beta
Size
2.8 kB gzip, budget 7.2 kB
Who uses it
No live product imports it yet Counted in the dated inventory of 2026-11-23.
import { docsSource } from "@krizaka/ui/docs-source";

Web only — React, from @krizaka/ui/docs-source. Beta: its API may still change in a minor version.

  • Mobile · n/a. Documentation is read on the sites, not inside an app.
  • Desktop · n/a. A public site's content, not a window of the Mac app.

Why it is here. A folder of Markdown rendered as docs pages, nav, headings and pager: the products' documentation sites adopt it (krizaka-internal#3886).

When to use

  • A product's docs written as Markdown files, French and English, rendered with DocsArticlePage.
  • A coming-soon site that carries its documentation without a docs engine.

When not to use

  • For the documentation of a component, generated from its code.
  • For long editorial pieces with a layout of their own.Use instead: Longform page

Installation

Install

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Import

import { docsSource } from "@krizaka/ui/docs-source";

Examples

From files to an article

Three Markdown files in English and French, read into a DocsArticlePage.

Props

This module has no component props: see the import and the preview above.

Accessibility

  • It produces data, not markup: the nav, the breadcrumb and the contents are DocsNav, DocsArticlePage and Toc.
  • The page's language is the reader's; a fallback page is flagged so the app can set lang on it.

Best practices

  • One file per page and language: getting-started.fr.md, getting-started.en.md; guides/install.en.md makes the slug guides/install.
  • Front matter: title, description, group, order (a number), updated (YYYY-MM-DD); only title is needed (or a first # heading).
  • Render the body with Markdown and headingIds: its ids are the ones the contents list.
  • A page with no file in the reader's language falls back to the default language and says so (fallback).

Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page