scroll: Vertical and horizontal scroll

Description Usage Arguments See Also Examples

View source: R/design.R

Description

Many of the applications you build despite a complex layout will still fit onto a single page. To help scroll long content alongside shorter content use the scroll() utility function.

Usage

1
scroll(tag, direction = "vertical")

Arguments

tag

A tag element.

direction

One of "horizontal" or "vertical" specifying which direction to scroll overflowing content, defaults to "vertical", in which case the content may scroll up and down.

See Also

Other design utilities: active(), affix(), background(), border(), display(), float(), font(), height(), padding(), shadow(), width()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
### A simple scroll

div(
  lapply(
    rep("Integer placerat tristique nisl.", 20),
    . %>% p() %>% margin(bottom = 2)
  )
) %>%
  height(20) %>%
  border("black") %>%
  scroll()

yonder documentation built on Jan. 11, 2020, 9:35 a.m.