Back To Top

Button with a progress ring that fills as you scroll.

Scroll down. Row 1

Scroll down. Row 2

Scroll down. Row 3

Scroll down. Row 4

Scroll down. Row 5

Scroll down. Row 6

Scroll down. Row 7

Scroll down. Row 8

Scroll down. Row 9

Scroll down. Row 10

Scroll down. Row 11

Scroll down. Row 12

Scroll down. Row 13

Scroll down. Row 14

Scroll down. Row 15

Scroll down. Row 16

Scroll down. Row 17

Scroll down. Row 18

Scroll down. Row 19

Scroll down. Row 20

Scroll down. Row 21

Scroll down. Row 22

Scroll down. Row 23

Scroll down. Row 24

Edit with AIPro

Describe a change to Back To Top and get the updated code. The live preview above stays as the original.

Quality report

Kinetiq Verified
  • Loads cleanly

    No errors on phone and desktop screens.

  • Fits a phone screen

    No sideways scrolling at 375 px wide.

  • No serious accessibility problems

    Passed the axe-core WCAG 2.1 A/AA check.

Size (gzipped)
1.0 KB
Extra packages
motion, lucide-react
Reduced motion
Not handled in the file

Tested automatically in Chrome 157.0.8103.79 with axe-core 4.14.1. Automated tools catch only part of all accessibility problems, so treat this as a solid minimum, not a full audit.

Installation

One command

Adds the file to components/ui/back-to-top.tsx and installs motion and lucide-react for you.

$ npx kinetiq-ui login
$ npx kinetiq-ui add back-to-top

Run login once. It needs a free account, because the code is for signed-in users only. Get your token.

Or do it by hand

  1. Install the dependencies

    $ npm i motion lucide-react
  2. Sign in, open the Code tab above and copy it into components/ui/back-to-top.tsx

  3. Use it

    The file exports the component and a Demo showing typical usage. Import whichever you need.