UI / Components / doc / KaTeX

KaTeX

Inline + block math, KaTeX-powered.

KaTeX math rendering. Inline mode (`$E=mc^2$`) and block mode (`$$\\int$$`). Lazy-loads KaTeX on first render.

$npx dock-ui add katex

Usage

import { Math } from "@/components/ui/katex";

<Math inline source="E = mc^2" />
<Math source="\\int_a^b f(x) dx" />

Install

via CLI
$ npx dock-ui add katex
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/katex.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →