Scroll to top button useful for landing pages, automatically hides itself when not scrolled
import { ScrollToTopButton } from "@/components/ui/scroll-to-top-button"; export default function DemoOne() { return ( <main className="min-h-dvh w-full overflow-y-auto"> <section className="h-dvh grid place-items-center text-lg w-screen"> Scroll down ⇣ </section> <div className="h-dvh w-full" /> <ScrollToTopButton /> </main> ); }