Sam

Scroll To Top Button

Buttons

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>
  );
}

Dependencies

More in Buttons

View all
  • Button

    Button

    20
  • Button

    Button

    3
  • Button Group

    Button Group

    18
  • Button

    Button

    149
  • Icon Label Subtext Button

    Icon Label Subtext Button

    69
  • Button

    Button

    9
  • Button

    Button

    37
  • Texture Button

    Texture Button

    113