---
title: "Scroll to top animated icon"
description: "Scroll to top animated icon (Actions). The page jumps back to the top. Light: the arrow dips to load, then shoots up and stops dead against the top bar; the bar takes the knock, rebounds and settles. The spent arrow fades at the top and a fresh one rises from below into its place. Strong: a deeper load, the same hard stop, and a bigger knock that rebounds twice."
canonical: https://generativeicons.com/icons/scroll-to-top/
---

# Scroll to top animated icon

The page jumps back to the top. Light: the arrow dips to load, then shoots up and stops dead against the top bar; the bar takes the knock, rebounds and settles. The spent arrow fades at the top and a fresh one rises from below into its place. Strong: a deeper load, the same hard stop, and a bigger knock that rebounds twice.

- Id: `scroll-to-top`
- Category: Actions
- Search terms: back to top, go to top, jump to top, top of page, return to top, scroll up, page up, start of page
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/scroll-to-top.lottie (dotLottie, 3128 bytes, sha256 3c1ce447cf5b9caa62c888d0201042aaaa96765584aa749963fb62442277d34f)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add scroll-to-top
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/scroll-to-top.mjs';

export function ScrollToTopIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/scroll-to-top.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/scroll-to-top/ · https://generativeicons.com/api/icons/scroll-to-top
