# UiScrollToTop
The UiScrollToTop component provides a sticky scroll "scroll to top" link at the bottom of the page.
This component should only be used in nuxt-starter/layouts components.
# Dependencies
This component depends on one third party module and one component.
# Third-party
# Components
# Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| offsetTop | Number | false | 200 | Defines at which point the component should be visible. The highter the number, the later it appears. |
# Variants
None.
# Example
Good
<!-- nuxt-starter/layouts/default.vue -->
<!--
The component needs DOM information,
therefore it makes sense to wrap the component
in client-only to prevent server side rendering -->
<client-only>
<UiScrollToTop />
</client-only>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Bad
<!-- nuxt-starter/pages/index.vue -->
<!-- Do not use the component on pages or components! -->
<div class="page">
<UiScrollToTop />
</div>
1
2
3
4
5
2
3
4
5
# TODO
- replace visible text with icon
- animate icon on hover