TableOfContents
A table of contents that displays links to the headings in the current document.
API Reference
Properties
| Property | Type | |
|---|---|---|
| Root | ComponentClass<{ children?: ReactNode; 'aria-labelledby'?: string | undefined; }, any> | FunctionComponent<{ children?: ReactNode; 'aria-labelledby'?: string | undefined; }> | |
| Title | ComponentClass<{ id?: string | undefined; children?: ReactNode; }, any> | FunctionComponent<{ id?: string | undefined; children?: ReactNode; }> | |
| List | ComponentClass<{ depth: number; children?: ReactNode; }, any> | FunctionComponent<{ depth: number; children?: ReactNode; }> | |
| Item | ComponentClass<{ children?: ReactNode; }, any> | FunctionComponent<{ children?: ReactNode; }> | |
| Link | ComponentClass<{ children?: ReactNode; href: string; suppressHydrationWarning?: boolean | undefined; 'aria-current'?: boolean | "location" | "time" | "false" | "true" | "page" | "step" | "date" | undefined; }, any> | FunctionComponent<{ children?: ReactNode; href: string; suppressHydrationWarning?: boolean | undefined; 'aria-current'?: boolean | "location" | "time" | "false" | "true" | "page" | "step" | "date" | undefined; }> | |
Properties
| Property | Type | |
|---|---|---|
| headings | Array<{ id: string; level: number; text: string; children?: ReactNode; }> | |
| components? | Partial<TableOfContentsComponents> | |
| children? | ReactNode | |
Script to manage active heading state in the table of contents.
Properties
| Property | Type | Default Value |
|---|---|---|
| nonce? | string | — |
A table of contents that displays links to the headings in the current document.
Properties
TableOfContentsPropsLast updated