Skip to content
compodocx
Skip to article content

Guide 06

JSDoc Tags

cngxjs (opens in new tab)Updated Guide06of 13

39 recognized tags grouped by where they apply. Unknown tags are not an error: style comments drop them and report them in the build log. @category and@docsKind are no longer read; compodocx migrate jsdocremoves them.

  • Members6 tags

    Recognized on properties, methods, host listeners, accessors.

    @param
    Paired with TypeScript type info. Descriptions thread onto constructor args.
    @returns
    Return-value description.
    @example
    Fenced code block, Shiki-highlighted. Text on the tag line before the fence, or a <caption> element, becomes a caption.
    @see
    Appended as a See-also link block.
    @since
    Small version label next to the member name.
    @deprecated
    Strikethrough name plus a deprecation banner. Takes an optional reason string.
  • Symbols6 tags

    Class, interface, enum, type alias, function, variable.

    @example
    Rendered as an Examples block on the Info tab. Multiple allowed. Text on the tag line before the fence, or a <caption> element, becomes a caption.
    @see
    See-also section with link resolution.
    @since / @deprecated
    Same semantics as on members.
    @internal
    Hides the symbol when --disableInternal is set.
    @feature <key>
    Puts the symbol into a feature of its entry point, above the detected one. The features config wins over the tag. It cannot move a symbol into another entry point.
    @axis <name> <value>
    Sets the value on a classification axis declared in classificationAxes. Shows as a chip on the page and a search filter.
  • Component-only4 tags

    Component tags, plus the example marker that works on any class.

    @slot
    Documents an exposed content slot. Renders as a metadata card on the Info tab.
    @playground
    Author-curated runnable demo. Surfaces a Playground tab with one StackBlitz launcher per block.
    @playgroundConfig <path>
    Points all @playground blocks of the component at a .ts file that exports appConfig, for providers and routing.
    <example-url>
    JSDoc marker pointing at a hosted demo URL. Surfaces an Examples tab with an iframe per URL. Counts only for the class whose comment holds it.
  • Status badges3 tags

    Stamp the entity hero with status pills. Visible at the top of the rendered page.

    @beta
    Adds a "Beta" badge.
    @breaking <version>
    Adds a "Breaking" badge that pins the version.
    @since <version>
    Adds a version badge to the entity hero.
  • Accessibility2 tags

    Surface conformance metadata. The hero chip is the single user-visible signal; the free-form note travels with the entity for the LLM-md export and future reverse-lookups.

    @wcag A | AA | AAA
    Renders a coloured chip in the entity hero (neutral A, green AA, blue AAA). Case-insensitive. Invalid values log a build warning and skip the chip. Also emits a search filter so the command palette can narrow to a level.
    @a11y <text>
    Free-form markdown accessibility note. Parsed and attached to the entity (IDep.a11yNote), exported through the llm-md bundle. Not rendered as a page section by design - the WCAG chip stays the only on-page conformance signal.
  • Provenance2 tags

    Mark entities or markdown files as AI-assisted so readers can reason about source quality.

    @aiGenerated [label]
    JSDoc tag for entities and members (@ai and @aigen are synonyms). Shows an "AI generated" chip and a sentence with the optional value: a model name, a date, or key=value pairs. Set the text with aiGeneratedNote, hide it with --hideAiGeneratedBadge.
    <!-- @aiGenerated [label] -->
    HTML-comment marker for markdown files. Place it on the first line of a README or additional page to flag the whole page with a banner.
  • Theming tokens10 tags

    Parsed from /// blocks in SCSS and /** */ blocks in CSS, in component styles and files listed in styleFiles. Unknown tags are dropped and reported once per run.

    @overview
    Description block at the top of the Theming tab.
    @type
    Token type (e.g. color, length, duration).
    @default
    Default value rendered next to the token name.
    @group
    Groups tokens under an H4 in the Theming tab.
    @example / @since / @see
    Same semantics as elsewhere.
    @deprecated
    Optional reason. Empty marks deprecated without a message.
    @cssprop
    Documents a property the component reads but never sets. Alias: @cssproperty.
    @themes <Name>
    File level. Links a style file to the components and directives it themes.
    @relatedTo <Name>
    Related-symbol links on a token, mixin, or style page.
    @internal
    Hides the token, hook, mixin, or function from the docs.
  • Inline1 tag

    Used inside descriptions. Resolved at build time.

    {@link Symbol}
    Project-wide cross-reference, with an optional label ({@link Symbol|label}). Also takes URLs and Markdown files. A target that resolves to nothing renders as code.

Theming token example

The token block sits above the actual property declaration. @overviewblocks at file-level open the Theming tab. Per-token blocks fill the catalog.

css
/**
 * @overview Card surface tokens.
 */

/**
 * Background of the card body.
 *
 * @type color
 * @default hsl(220 20% 98%)
 * @group Surface
 * @since 1.4.0
 * @example
 *   --color-app-card-bg: var(--color-cdx-bg-elevated);
 */
--color-app-card-bg: hsl(220 20% 98%);