---
url: /reference/@cssdoc/markdown/interfaces/BuildCssApiOptions.md
---
# Interface: BuildCssApiOptions

Defined in: [emitters/markdown/src/build.ts:31](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L31)

Options for [buildCssApi](../functions/buildCssApi.md).

## Extends

* [`RenderEntryOptions`](RenderEntryOptions.md).[`RenderIndexOptions`](RenderIndexOptions.md)

## Properties

### baseHref?

```ts
optional baseHref?: string;
```

Defined in: [emitters/markdown/src/render.ts:91](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L91)

Base href for `@related` cross-links (defaults to `./`). Set to `""` to render names without links.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`baseHref`](RenderEntryOptions.md#basehref)

***

### classNames?

```ts
optional classNames?: object;
```

Defined in: [emitters/markdown/src/render.ts:135](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L135)

Optional CSS classes for HTML-preserving renderers (e.g. VitePress). Each key is opt-in; omit for
pure markdown. Values are used verbatim as the `class` attribute (multiple space-separated tokens
allowed). Renderers that strip unknown attributes (e.g. GitHub) drop the class but keep the text.

#### affects?

```ts
optional affects?: string;
```

Wrap the "Affects" marker on a modifier row carrying an `@affects` descendant note.

#### alias?

```ts
optional alias?: string;
```

Wrap the "Alias" marker on a modifier row carrying an `@alias` mapping.

#### deprecated?

```ts
optional deprecated?: string;
```

Wrap deprecation output — the record-level `> [!WARNING]` banner and deprecated modifier-table
cells — in `<span class="…">`, e.g. `"-instui-pill -color-warning"`.

#### interaction?

```ts
optional interaction?: string;
```

Wrap the "Interaction" marker on a JS-only (`@interaction`-flagged) modifier row.

#### stage?

```ts
optional stage?: Partial<Record<CssReleaseStage, string>>;
```

Per-stage classes for the release-stage marker on the header line (the HTML emitter's `badge`
analog). Only the current record's stage is applied; omit a stage for pure markdown there.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`classNames`](RenderEntryOptions.md#classnames)

***

### configuration?

```ts
optional configuration?: CssDocConfiguration;
```

Defined in: [emitters/markdown/src/build.ts:37](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L37)

The tag configuration to parse with (e.g. from `@cssdoc/config`).

***

### css

```ts
css: string | string[];
```

Defined in: [emitters/markdown/src/build.ts:33](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L33)

The CSS source (one string, or several concatenated).

***

### dialect?

```ts
optional dialect?: CssDialect;
```

Defined in: [emitters/markdown/src/build.ts:41](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L41)

The stylesheet dialect of `css` (`scss`/`less` pick a dialect parser). Default `css`.

***

### groups?

```ts
optional groups?: readonly string[];
```

Defined in: [emitters/markdown/src/render.ts:168](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L168)

Explicit group order for the sidebar and index. Listed labels come first, in this order; any
unlisted group follows in the default order ([KIND\_GROUPS](../variables/KIND_GROUPS.md) kinds, then custom `@group` groups
in first-appearance order). Omitted → the default order. See [groupEntries](../functions/groupEntries.md).

#### Inherited from

[`RenderIndexOptions`](RenderIndexOptions.md).[`groups`](RenderIndexOptions.md#groups)

***

### headingPrefix?

```ts
optional headingPrefix?: string;
```

Defined in: [emitters/markdown/src/render.ts:117](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L117)

Heading prefix for the page title (defaults to no prefix, i.e. just the record name).

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`headingPrefix`](RenderEntryOptions.md#headingprefix)

***

### importSnippet?

```ts
optional importSnippet?: (entry) => string | undefined;
```

Defined in: [emitters/markdown/src/render.ts:89](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L89)

Produce an include/usage snippet for a record, rendered as a fenced block in the "Usage" section
alongside any authored `@usage` prose (e.g. the `@import` line and class-prefix convention).

#### Parameters

##### entry

[`CssDocEntry`](../../core/interfaces/CssDocEntry.md)

#### Returns

`string` | `undefined`

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`importSnippet`](RenderEntryOptions.md#importsnippet)

***

### includeAnnotations?

```ts
optional includeAnnotations?: boolean;
```

Defined in: [emitters/markdown/src/render.ts:110](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L110)

Emit the `## Annotations` section. Annotations are internal guidance (like `@privateRemarks`);
defaults to `false` so public emitters omit them by default.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`includeAnnotations`](RenderEntryOptions.md#includeannotations)

***

### includeDecorators?

```ts
optional includeDecorators?: boolean;
```

Defined in: [emitters/markdown/src/render.ts:115](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L115)

Emit object-model decorators (`@sealed`, `@frozen`, `@preventExtensions`, `@readonly`) on the
record meta line. Defaults to `false` so public emitters omit them by default.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`includeDecorators`](RenderEntryOptions.md#includedecorators)

***

### intro?

```ts
optional intro?: string;
```

Defined in: [emitters/markdown/src/render.ts:160](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L160)

An intro paragraph under the H1.

#### Inherited from

[`RenderIndexOptions`](RenderIndexOptions.md).[`intro`](RenderIndexOptions.md#intro)

***

### lang?

```ts
optional lang?: "css" | "html" | "js" | "markdown";
```

Defined in: [emitters/markdown/src/build.ts:39](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L39)

The host language `css` is written in. Non-`css` values extract embedded CSS first. Default `css`.

***

### members?

```ts
optional members?: readonly object[];
```

Defined in: [emitters/markdown/src/render.ts:103](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L103)

Sibling records that declared `@memberOf` naming this record as their parent — the inverse
direction of `@structure` containment. Supplied by `buildCssApi` from the full set of records;
merged into the "Subcomponents" section alongside structurally-nested children.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`members`](RenderEntryOptions.md#members)

***

### outDir

```ts
outDir: string;
```

Defined in: [emitters/markdown/src/build.ts:35](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L35)

The output directory (created if missing).

***

### providers?

```ts
optional providers?: object;
```

Defined in: [emitters/markdown/src/build.ts:49](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L49)

Upstream cssdoc providers this doc set consumes (from `resolveProviders` in `@cssdoc/config`). Their
components become cross-link targets, so an `@structure` reference or Subcomponents entry pointing
at a provider component links out to the provider's rendered page (via its `href`).

#### entries

```ts
entries: readonly CssDocEntry[];
```

#### href

```ts
href: (className) => string | undefined;
```

##### Parameters

###### className

`string`

##### Returns

`string` | `undefined`

***

### resolveComponent?

```ts
optional resolveComponent?: (className) => 
  | {
  href: string;
  name: string;
}
  | undefined;
```

Defined in: [emitters/markdown/src/render.ts:97](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L97)

Resolve a bare class name to the component whose base class it is (for `@structure` sibling
references) — returns the component's name + page href, else `undefined`. Supplied by `buildCssApi`
from the full set of records; powers the "Subcomponents" section.

#### Parameters

##### className

`string`

#### Returns

| {
`href`: `string`;
`name`: `string`;
}
| `undefined`

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`resolveComponent`](RenderEntryOptions.md#resolvecomponent)

***

### resolveDemo?

```ts
optional resolveDemo?: (entry) => string | undefined;
```

Defined in: [emitters/markdown/src/render.ts:82](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L82)

Choose the demo spec for an entry (defaults to `entry.demo`).

#### Parameters

##### entry

[`CssDocEntry`](../../core/interfaces/CssDocEntry.md)

#### Returns

`string` | `undefined`

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`resolveDemo`](RenderEntryOptions.md#resolvedemo)

***

### resolveSource?

```ts
optional resolveSource?: ResolveSource;
```

Defined in: [emitters/markdown/src/render.ts:84](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L84)

Resolve a record to a source link, rendered on the meta line as `**Source:** [label](href)`.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`resolveSource`](RenderEntryOptions.md#resolvesource)

***

### resolveToken?

```ts
optional resolveToken?: ResolveToken;
```

Defined in: [emitters/markdown/src/render.ts:80](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L80)

Resolve a consumed token's type/value (adds Type + Value columns to "Tokens consumed").

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`resolveToken`](RenderEntryOptions.md#resolvetoken)

***

### sectionOrder?

```ts
optional sectionOrder?: readonly SectionKey[];
```

Defined in: [emitters/markdown/src/render.ts:105](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L105)

Reorder (or drop) the `##` sections; defaults to [DEFAULT\_SECTION\_ORDER](../variables/DEFAULT_SECTION_ORDER.md).

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`sectionOrder`](RenderEntryOptions.md#sectionorder)

***

### sidebarFileName?

```ts
optional sidebarFileName?: string;
```

Defined in: [emitters/markdown/src/build.ts:43](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L43)

The sidebar file name (defaults to `css-sidebar.json`).

***

### structureVariantView?

```ts
optional structureVariantView?: "diagram" | "sections";
```

Defined in: [emitters/markdown/src/render.ts:129](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L129)

How alternative DOM shapes (from top-level `@variant` blocks in `@structure`) render, when present:
`"diagram"` emits one combined flowchart with a labelled subgraph per variant; `"sections"` emits a
`### Variant: <name>` subsection per variant, each with its own text tree/diagram per
[structureView](RenderEntryOptions.md#structureview). Defaults to `"diagram"`. Ignored when no `@variant` was authored.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`structureVariantView`](RenderEntryOptions.md#structurevariantview)

***

### structureView?

```ts
optional structureView?: "text" | "diagram" | "both";
```

Defined in: [emitters/markdown/src/render.ts:122](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L122)

Which representation(s) the `## Structure` section emits: the ` ```text ` tree, the ` ```mermaid `
flowchart, or both. Defaults to `"both"`.

#### Inherited from

[`RenderEntryOptions`](RenderEntryOptions.md).[`structureView`](RenderEntryOptions.md#structureview)

***

### title?

```ts
optional title?: string;
```

Defined in: [emitters/markdown/src/render.ts:158](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/render.ts#L158)

The index H1 (defaults to `"CSS API reference"`).

#### Inherited from

[`RenderIndexOptions`](RenderIndexOptions.md).[`title`](RenderIndexOptions.md#title)
