downloadFileButton: downloadFileButton UI

Description Usage Arguments Button Features Example Shiny Usage See Also Examples

View source: R/downloadFile.R

Description

Creates a custom high-functionality button for file downloads with two states - single download type or multiple-download types. The button image and pop-up menu (if needed) are set accordingly. A tooltip can also be set for the button.

Usage

1
downloadFileButton(id, downloadtypes = c("csv"), hovertext = NULL)

Arguments

id

character id for the object

downloadtypes

vector of values for data download types

hovertext

tooltip hover text

Button Features

Example

downloadFileUI("mybuttonID1", c("csv", "tsv"), "Click Here") downloadFileUI("mybuttonID2", "csv", "Click to download")

Shiny Usage

Call this function at the place in ui.R where the button should be placed.

It is paired with a call to shiny::callModule(downloadFile, id, ...) in server.R

See Also

downloadFile

downloadFile_ValidateTypes

downloadFile_AvailableTypes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Inside ui_body.R or ui_sidebar.R

#single download type
downloadFileButton("object_id1", 
                   downloadtypes = c("csv"), 
                   hovertext = "Button 1 Tooltip")

#multiple download types
downloadFileButton("object_id2", 
                   downloadtypes = c("csv", "tsv"), 
                   hovertext = "Button 2 Tooltip")

periscope documentation built on July 8, 2020, 7:18 p.m.