About
Scroll to top button useful for landing pages, automatically hides itself when not scrolled
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scroll To Top Button to your project and fits it to your theme.
Code
How Scroll To Top Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
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>
);
}








