You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**backgroundColor**| string |`'#1775d1'` (blue) | Background color of the back to top button (hex string). |
61
-
|**bottomOffset**| string \| number |`'0px'`| Offset `px` from bottom of page when scrolled to bottom. For example this can be used to make sure the back to top button never overlaps a footer. |
62
-
|**displayAtYPosition**| string \| number |`'420px'`| The back to top button will not be displayed until the user scrolls to the provided Y (vertical `px`) coordinate on the page. |
63
-
|**position**|`'left'`\|`'right'`|`'right'`| Position on-screen where the back to top button is displayed. |
64
-
|**styleHeight**| string |`'25px'`| Height of back to top button in string px format. |
65
-
|**styleWidth**| string |`'25px'`| Width of back to top button in string px format. |
66
-
|**styleZIndex**| number |`999`| Style the `z-index` for the back to top button as needed for correct layer height adjustment. This can be useful when working with sticky headers. |
67
-
68
-
# Example(s)
69
-
73
+
Example with optional inputs
70
74
```html
71
75
<ngx-scroll-top
72
-
backgroundColor="black"
73
-
[bottomOffset]="footerHeightPx || 200"
74
-
displayAtYPosition="250px"
76
+
backgroundColor="#0D58C0"
77
+
[bottomOffset]="footer.height"
78
+
[displayAtYPosition]="1000"
79
+
fontColor="#FFFAFA"
80
+
fontSize="2rem"
81
+
height="3rem"
75
82
position="left"
76
-
styleHeight="30px"
77
-
styleWidth="30px"
78
-
[styleZIndex]="500"
79
-
>
80
-
↑
81
-
</ngx-scroll-top>
83
+
[zIndex]="1"
84
+
width="3rem"
85
+
>⇮</ngx-scroll-top>
82
86
```
83
87
88
+
# Component API
89
+
90
+
| Input | Value Typing | Default Value | Description |
|**backgroundColor**| string |`'#0D58C0'` (dark-blue) | Background color of the back to top button. Define any `'x'` css property available for `'background-color: x'`. |
93
+
|**bottomOffset**| string \| number |`'0px'`| Offset `px` from bottom of page when scrolled to bottom. For example this can be used to make sure the back to top button never overlaps a footer. |
94
+
|**displayAtYPosition**| string \| number |`'420px'`| The back to top button will not be displayed until the user scrolls to the provided Y (vertical `px`) coordinate on the page. |
95
+
|**fontColor**| string |`'#FFFFFF'` (white) | The font color for the nested content within the back to top button. Define any `'x'` css property available for `'color: x'`. |
96
+
|**fontSize**| string |`'16px'`| The font size for the nested content within the back to top button. Define any `'x'` css property available for `'font-size: x'`. |
97
+
|**height**| string |`'40px'`| Height of back to top button in string px format. |
98
+
|**position**|`'left'`\|`'right'`|`'right'`| Position on-screen where the back to top button is displayed. |
99
+
|**width**| string |`'40px'`| Width of back to top button in string px format. |
100
+
|**zIndex**| number |`999`| Style the `z-index` for the back to top button as needed for correct layer height adjustment. This can be useful when working with sticky headers. |
101
+
84
102
# Compatibility
85
103
86
104
| Angular version |@proangular/ngx-scroll-top| Install |
0 commit comments