3
Je souhaite contrôler de manière sélective la mise à l'échelle des polices avec une barre de défilement. Est-ce possible?Propriétés Reactive CSS dans R Shiny
J'ai joint un MRE qui, je crois, démontre où je suis coincé et ce que j'essaie d'accomplir.
if(!require('pacman')) {install.packages("pacman")} # Ensures that pacman is installed for auto-installation
pacman::p_load(shiny, lipsum) # automatically installs and loads packages.
ui <- fluidPage(# Sidebar with a slider input for font size
sidebarLayout(sidebarPanel(
sliderInput("font_size", "Font Size:", min = 1, max = 200, value = 70
)
),
mainPanel(
wellPanel(
id = "textPanel",
style = "overflow-y:scroll; max-height: 50vh; font-size: 70%",
#style = paste0("overflow-y:scroll; max-height: 50vh; font-size: ",
# output$text_size,"70%"),
paste0(lipsum[2:10], collapse = "")))))
# Define server logic
server <- function(input, output) {
output$text_size = renderText({input$font_size})}
# Run the application
shinyApp(ui = ui, server = server)