tinyslider: Create a carousel with tinyslider

Description Usage Arguments Details Value Examples

View source: R/tinyslider.R

Description

Create a carousel with tinyslider

Usage

1
2
3
4
5
6
tinyslider(
  ...,
  options = list(),
  responsive_options = list(),
  elementId = NULL
)

Arguments

...

Items created with tinyslider_card(), or plots embedded in plot_to_card.

options

List of options for the carousel.

responsive_options

List of options that differ according to viewport size. See the examples.

elementId

Id of the carousel

Details

Due to its length, I do not detail the list of options available. This list is available here.

WARNING: the option "container" is automatically set in the function and therefore should not be modified.

Value

An htmlwidget visible in RStudio viewer or in a web browser. This htmlwidget can be stored into an object (such as x <- tinyslider().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Not run: 
tinyslider(
  tinyslider_card(
    title = "First title",
    subtitle = "First subtitle",
    content = paste0(
      "Lorem Ipsum is simply dummy text of",
      "the printing and typesetting industry. Lorem Ipsum has been the",
      "industry's standard dummy text ever since the 1500s,",
      "when an unknown printer took a galley of type and scrambled",
      "it to make a type specimen book."
    ),
    image = "https://placeimg.com/200/150/nature"
  ),
  tinyslider_card(
    "Second title",
    "Second subtitle",
    "There is a button below",
    button_text = "See more",
    image = "https://placeimg.com/200/150/nature/2"
  ),
  tinyslider_card(
    "Third title",
    subtitle = NULL,
    content = paste0(
      "Lorem Ipsum is simply dummy text of",
      "the printing and typesetting industry. Lorem Ipsum has been",
      "the industry's standard dummy text ever since the 1500s,",
      "when an unknown printer took a galley of type and",
      "scrambled it to make a type specimen book. It has",
      "survived not only five centuries, but also the leap into",
      "electronic typesetting, remaining essentially unchanged.",
      "It was popularised in the 1960s with the",
      "release of Letraset sheets containing Lorem Ipsum passages,",
      "and more recently with desktop publishing",
      "software like Aldus PageMaker including versions of Lorem Ipsum."
    )
  ),
  options = list(
    loop = TRUE,
    autoplay = TRUE,
    autoplayTimeout = 1000
  )
)

## End(Not run)

etiennebacher/shinymisc documentation built on Jan. 1, 2021, 1:14 a.m.