# useScrollTop useScrollTop is a hook that provides a way to scroll to the top of a container. ## Usage ```tsx import { useScrollTop } from '@primereact/hooks/use-scrolltop'; ``` ```tsx const scrollTop = useScrollTop(); ``` ## Examples ### Basic useScrollTop listens window scroll by default. Setting the _target_ option binds useScrollTop to this element that has scrolling content. ### Element