Skip to content

BackToTop

Appears after scrolling a long page down; takes the person back to the top.

import { BackToTop } from '@sypnia/ui/react'

On this page
  1. On this page
  2. When to use it
  3. For everyone
  4. Props

On this page

Scroll the page down past 800 pixels and look at the bottom right corner.

Code
import { BackToTop } from '@sypnia/ui/react';

// Scroll this page down: the button appears at the bottom right.
export default function Top() { return <><p>Scroll the page down past 800 pixels and look at the bottom right corner.</p><BackToTop /></>; }

When to use it

Use it when

  • Long pages: docs, changelogs, long lists.

Do not use it when

  • Short pages, or pages with a sticky navigation already in reach.

For everyone

  • It is a button named «Back to top»; on phones it sits above the bottom bar.

Props

BackToTopTypeDefault
after number 800
  1. On this page
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms