use_gotop: Add scroll up icon

Description Usage Arguments Value Examples

View source: R/gotop.R

Description

Add scroll up icon

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
use_gotop(
  src = "fas fa-chevron-up",
  width = 45,
  opacity = 0.5,
  place = "right",
  color = "",
  appear = 200,
  scrolltime = 800,
  fadein = 500,
  fadeout = 500,
  marginX = 2,
  marginY = 2,
  container = "",
  zIndex = 9
)

Arguments

src

string The CSS classes used to display the arrow.

width

integer The width of the arrow.

opacity

decimal Sets the transparency level for the arrow, where 1 is not transparent at all, 0.5 is 50 percent see-through and 0 is completely transparent.

place

string The location where the arrow will be shown. Valid values are “right” or “left”.

color

string The color of the selected CSS classes icon.

appear

integer The amount of pixels the page must be scrolled down before the arrow is displayed.

scrolltime

integer A number determining how long the animation will run when scrolling to the top of the page.

fadein

integer A number determining how long the animation will run when fading in to opaque.

fadeout

integer A number determining how long the animation will run when fading out to transparent.

marginX

integer The percentage amount indicating how far away the arrow is from the bottom, left, or right, depending on the value of place.

marginY

integer The percentage amount indicating how far away the arrow is from the top or bottom, depending on the value of place.

container

string The HTML element to which the scroll function will be attached. If no value is given, then the scroll function will be attched to the window.

zIndex

integer The z-index value.

Value

Javascript code initializing GoTop with dependencies

Examples

1

gotop documentation built on April 26, 2020, 1:05 a.m.