Returns a set of hooks to manage the active section in a scrollable container.
Parameter | Type | Default Value |
---|---|---|
{ rootMargin, } | {
rootMargin,
}: { rootMargin?: string } = {} | {} |
{ scrollToSection: (sectionId: string) => void; useSection: (id: string) => boolean; useLink: (id: string) => readonly [boolean | null, { readonly href: `#${string}`; readonly onClick: (e: MouseEvent<HTMLAnchorElement, MouseEvent>) => void; }]; }