Carregando…
Carregando…
Carregando…Flat navigation that highlights the active section based on scroll position.
Scroll Spy — highlights active section on scroll
Scroll the page to see the active item update.
#intro
#install
#config
#tokens
#usage
$ npx kikitocn add scroll-spy@/lib/utilsimport { ScrollSpy } from "@/components/ui/cn/scroll-spy/ScrollSpy";
export function ScrollSpyExample() {
return (
<ScrollSpy />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
items* | ScrollSpyItem[] | — | Itens de navegação: { id, label, depth? } |
offset | number | 80 | Offset vertical do ponto de ativação em px |
className | string | — | Classes CSS extras |
style | React.CSSProperties | — | Estilos inline |