@category — group a symbol in the sidebar
@category puts a symbol's generated page into an explicit sidebar group instead of its default kind section (Classes, Modules, Namespaces, …):
/**
* @category Core
*/
export class Parser {}Parser now lives under a Core group rather than under Classes.
@categoryis an unknown tag — settags.allowUnknownTags: truein yourjsdoc.jsonor JSDoc strips it before the theme runs. See the overview. (TypeDoc needs no flag.)
The path grammar
parseCategory (in generate-site.ts) splits the tag text on whitespace, then:
- The leading run of plain tokens is the group path, joined with a single space.
- Parsing switches to options at the first token containing
=. Everything from there on iskey=value. - A literal
/is what nests a group. Spaces do not nest.
Spaces stay in the name; / nests
This is the subtle part. A space is just part of the group name — only / creates a parent ▸ child relationship.
/** @category Getting Started */
export class Intro {}→ one flat group literally named Getting Started (the space is kept).
/** @category Core/Parsing */
export class Lexer {}→ nests the page under Core ▸ Parsing.
You can nest as deep as you like — @category Core/Parsing/Internals → Core ▸ Parsing ▸ Internals.
First @category wins
If a symbol carries more than one @category, the first one is used; the rest are ignored.
Inline order=
The only @category option today is order — the within-group sort key:
/** @category Core/Parsing order=1 */
export class Lexer {}
/** @category Core/Parsing order=2 */
export class Token {}Lexer sorts before Token inside Core ▸ Parsing. The path is the leading tokens; options follow the first =, so Getting Started order=1 is the group Getting Started with order=1.
A missing or non-numeric
orderis left undefined — the page then sorts last, alphabetically, like an untagged one.
Worked examples
/** @category Core */
export class A {} // → Core
/** @category Core/Schema order=1 */
export class Point {} // → Core ▸ Schema, first
/** @category Data Pipeline */
export class Stage {} // → "Data Pipeline" (one group; space kept)
/** @category Advanced/Internals order=10 */
export class Cache {} // → Advanced ▸ Internals, order 10Combining with @order
order= inline on @category and the standalone @order tag both feed the same sort key. When a symbol has both, the inline @category … order= wins — see the precedence rule on the @order page.
How it shapes the sidebar
@category is one lever in the theme's single sidebar-ordering engine — every entry carries a group path and an optional order. The prose counterpart is a guide page's group frontmatter (same /-nesting rules). The full model — nested paths, leaf-vs-branch ordering, clubSidebarItems, sectionOrder, docGroups, and menu — is in Structure your sidebar.
See also
- Components overview — the full tag list +
allowUnknownTags. @order— ordering symbols without a category.- Structure your sidebar — how groups + order combine.