View source: R/selectControl.R
HTMLchoices | R Documentation |
Create an object for choices resorting to HTML.
HTMLchoices(labels, values)
labels |
the labels of the select control, can be HTML elements created
with the |
values |
the values associated to the labels, they must be character strings, given in a vector or in a list |
An object (the values
object with some attributes) to be
passed on to the choices
argument of the
selectControlInput
function.
HTMLgroupedChoices
for choices with groups.
library(shinySelect) library(fontawesome) library(shiny) food <- HTMLchoices( labels = list( tags$span(fa_i("hamburger"), "Hamburger"), tags$span(fa_i("pizza-slice"), "Pizza"), tags$span(fa_i("fish"), "Fish") ), values = list("hamburger", "pizza", "fish") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.