-1

I have a button with a long label parts of which I want to format bold. How to do it?

library(shiny)

ui <- fluidPage(
  actionButton(inputId = "ab1",
               label = "The first 3 words should be bold.")
)

server <- function(input, output) {}

shinyApp(ui, server)

One solution is to put the label text in a html file and then set the label with label = includeHTML("custom_label.html"). Is there an easier solution?

Joe
  • 1,628
  • 3
  • 25
  • 39

1 Answers1

3

Not sure to understand. Is it what you want:

ui <- fluidPage(
    actionButton(inputId = "ab1",
                 label = HTML("<b>The first 3 words</b> should be bold."))
)
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225