Carregando…
Carregando…
Carregando…Fixed progress bar tracking scroll position on the page or a container element.
Scroll Progress — barra de progresso que acompanha o scroll
Role para ver a barra preencher
$ npx kikitocn add scroll-progress@/lib/utilsimport { ScrollProgress } from "@/components/ui/cn/scroll-progress/ScrollProgress";
export function ScrollProgressExample() {
return (
<ScrollProgress />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
target | 'page' | React.RefObject<HTMLElement> | 'page' | Alvo do rastreamento de scroll |
height | number | 3 | Espessura da barra em px |
color | string | undefined | Cor CSS da barra (padrão: var(--ks-primary)) |
position | 'top' | 'bottom' | 'top' | Posição da barra na tela |
zIndex | number | 9999 | Z-index da barra |