you could make yourseslf a custom wrapper for convenience:
library(shiny)
library(icons)
myButton <- function(inputId,label,icon,width=NULL){
actionButton(inputId, div(label,style="float:right;padding-left:3px;"),icon=NULL, width = width,
img(icon))
}
# using fontawesome$solid$rocket in console works fine
ui <- fluidPage(
actionButton("r1", div("Rocket",style="float:right;padding-left:3px;"),icon=NULL, width = NULL,
img(fontawesome$solid$rocket)
),
actionButton("d1", "Rocket", icon = icon("rocket")
),
myButton("r2","Rocket",fontawesome$solid$rocket)
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
I think I'll stop there !