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

    1
  • Texture Button

    Texture Button

    97
  • Eclipse Button

    Eclipse Button

    39
  • App Store Button

    App Store Button

    458
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Button

    Button

    4
  • Button

    Button

    65
  • Button

    Button

    68