RinteRface / fullPage

📄 fullPage.js, pagePiling.js and multiScroll.js for shiny
https://fullpage.rinterface.com
Other
110 stars 12 forks source link

Add pickerInput in the header / menu section #17

Open mzuer opened 1 year ago

mzuer commented 1 year ago

Hi,

Thanks for this nice package :-)

I am building a R Shiny App with the package fullPage ; I would like to have in the header (=appearing on all pages) a pickerInput that allows the user to select the language.

Is it a way to achieve this ?

What I was able to do, is only to have this element on the 1st page, but I would like to have it on all pages, ideally in the header, at the same level as the ''menu'' (next to ''First'' and ''Second'' in the minimal example here below).

library(shiny)
library(fullPage)
ui <- fullPage(
  menu=c("First"="first",
         "Second" ="second"),
  fullSection(
    menu = "first",
    center = TRUE,
    pickerInput(
      inputId = "lang_select",
      label = "Language",
      choices = c("ENG", "FR"),
      options = list(
        style = "btn-primary")
    ),

    h1("Callbacks")
  ),
  fullSection(
    menu = "second",
    center = TRUE,
    h3("Slice"),
    verbatimTextOutput("slide")
  )
)

server <- function(input, output){
}
shinyApp(ui, server)