TableOfContents
A table of contents that displays links to the headings in the current document.
API Reference
Properties
| Property | Type | Modifiers |
|---|---|---|
| Root | ComponentClass<{ children?: React.ReactNode; 'aria-labelledby'?: string; }, any> | FunctionComponent<{ children?: React.ReactNode; 'aria-labelledby'?: string; }> | — |
Root navigation element. | ||
| Title | ComponentClass<{ id?: string; children?: React.ReactNode; }, any> | FunctionComponent<{ id?: string; children?: React.ReactNode; }> | — |
Title heading. | ||
| List | ComponentClass<{ depth: number; children?: React.ReactNode; }, any> | FunctionComponent<{ depth: number; children?: React.ReactNode; }> | — |
Ordered list of items. | ||
| Item | ComponentClass<{ children?: React.ReactNode; }, any> | FunctionComponent<{ children?: React.ReactNode; }> | — |
Individual list item. | ||
| Link | ComponentClass<{ children?: React.ReactNode; href: string; suppressHydrationWarning?: boolean; 'aria-current'?: React.AriaAttributes["aria-current"]; }, any> | FunctionComponent<{ children?: React.ReactNode; href: string; suppressHydrationWarning?: boolean; 'aria-current'?: React.AriaAttributes["aria-current"]; }> | — |
Anchor link to a heading. | ||
Properties
| Property | Type | Modifiers |
|---|---|---|
| headings | Array<{ id: string; level: number; text: string; summary?: string; children?: React.ReactNode; }> | — |
The headings to display within the table of contents. | ||
| components? | Partial<TableOfContentsComponents> | — |
Override the default component renderers. | ||
| children? | React.ReactNode | — |
Optional content rendered after the heading links. | ||
A table of contents that displays links to the headings in the current document.
Properties
TableOfContentsPropsReturns
null | React.JSX.ElementLast updated