carouselUI: carouselUI

Description Usage Arguments Value Note Author(s) Examples

Description

Make a dynamic carousel for use with shiny::renderUI() and shiny::uiOutput().

Usage

1
carouselUI(slides, data.interval = 10000, data.ride = "carousel")

Arguments

slides

A list of HTML tag elements, e.g. list(div(), div()).

data.interval

Milliseconds to pause before auto advancing (numeric), or 'false' for manual advance only.

data.ride

Either carousel or NA; unclear if this works.

Value

HTML code with class shiny.tag that can be passed to uiOutput.

Note

Adapted by JEK from https://github.com/dcurrier/carouselPanel/blob/master/carouselPanel.R

Author(s)

Jon Katz

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
c.slides <- lapply(1:5, function(x) div(h3(style='text-align:center;',paste('Slide', x))))
carouselUI(slides=c.slides, data.interval=5000, data.ride=FALSE)

## Not run: 
/*     place in www/css/styles.css:    */
    .carousel-indicators li {
        background-color: #DDD;
        background-color: rgba(70,70,70,.25);
    }
    .carousel-indicators .active {
        background-color: #999;
    }
    .carousel-indicators {
        bottom: 15px !important;
        top: auto;
        list-style: none outside none;
        margin: 0;
        position: absolute;
        right: 70px;
        z-index: 5;
    }
    .carousel-control {
        opacity: 0.2;
        border: none;
        top: auto;
    }
    .item {
        padding: 0px 17px;
    }

## End(Not run)

jonkatz2/shinyAddOns documentation built on May 19, 2019, 7:30 p.m.