UNPKG

beta-parity-react

Version:

Beta Parity React Components

67 lines 2.01 kB
import React from 'react'; import './index.css'; import './variables.css'; /** * Props for the ContentNavigation component. * * Extends properties from HTMLElement. */ export interface ContentNavigationProps extends React.HTMLAttributes<HTMLElement> { /** * The target element or CSS selector for the main container that contains the headings. * Can be either a CSS selector string or an HTMLElement reference. * * @default 'main' - The main element of the document * @memberof ContentNavigationProps */ target?: string | HTMLElement | null; /** * The space (in pixels) to maintain from the top of the viewport * when scrolling to a heading. * * @default 0 * @memberof ContentNavigationProps */ spaceToTop?: number; /** * Custom skeleton loader component to display while content is loading. * * @memberof ContentNavigationProps */ skeleton?: React.ReactNode; /** * The color theme for the navigation. * Can be either 'neutral' or 'accent'. * * @default 'neutral' * @memberof ContentNavigationProps */ color?: 'neutral' | 'accent'; /** * Exclude headings inside elements matching this selector (or array of selectors). * Useful to skip headings in certain sections. * * @memberof ContentNavigationProps */ exclude?: string | string[]; } /** * **Content Navigation Component** * * A navigation component that automatically generates a table of contents * from H2 and H3 headings within a specified container. It provides smooth * scrolling navigation and highlights the current section in view. * * @example * ```tsx * <ContentNavigation * target="#main-content" * spaceToTop={60} * color="accent" * /> * ``` * * @see {@link https://beta-parity-react.vercel.app/content-navigation Content Navigation} */ export declare const ContentNavigation: React.FC<ContentNavigationProps>; //# sourceMappingURL=index.d.ts.map