navbarPage_dsfr.Rd
Page avec navbar
navbarPage_dsfr(
title,
...,
header = header_dsfr(intitule = "intitule a remplacer"),
id = NULL,
footer = NULL
)
html
library(shiny)
# Define UI
ui <- navbarPage_dsfr(
title = "Welcome to the Jungle",
id = "nav",
header = header_dsfr(
intitule = c("République", br(), "Française"),
nom_site_service = "Nom du site / service",
baseline = "Baseline - pr\u00E9cisions sur l organisation"
),
# First tab
navbarPanel_dsfr(
title = "actionButton_dsfr()",
fluidRow_dsfr(
column_dsfr(
12,
h3('Demo actionButton_dsfr()'),
# Adding space to the column
# https://www.systeme-de-design.gouv.fr/elements-d-interface/fondamentaux-techniques/espacement
extra_class = "fr-my-6w"
),
column_dsfr(
4,
actionButton_dsfr(
"go",
label = "Un bouton avec un \u00E9!"
)
),
column_dsfr(
8,
p("Salut les gens!"),
verbatimTextOutput(
"output1"
)
)
)
)
,
# Second tab
navbarPanel_dsfr(
title = "radioButtons_dsfr()",
fluidRow_dsfr(
column_dsfr(
12,
h3("Demo radioButtons_dsfr()"),
# Adding space to the column
# https://www.systeme-de-design.gouv.fr/elements-d-interface/fondamentaux-techniques/espacement
extra_class = "fr-my-6w"
),
column_dsfr(
6,
radioButtons_dsfr(
inputId = "espece",
label = "Especes",
choices = c("Setosa" = "setosa", "Versicolor" = "versicolor"),
class = NULL
)
),
column_dsfr(
6,
verbatimTextOutput(
"output2"
)
)
)
)
)
# Define server logic
server <- function(input, output) {
# Server logic for Tab 1
output$output1 <- renderText({
paste("You clicked", input$go, "times")
})
output$output2 <- renderText({
paste("You've selected", input$espece)
})
}
if (interactive()) {
# Run the application
shinyApp(ui = ui, server = server)
}