conditionalUI | R Documentation |
This function takes some UI element and a compiletime-evaluated expression and returns the UI element ONLY if the condition is true
conditionalUI(expression, ui_element)
expression |
compile-time evaluated expression (no server/reactive variables) |
ui_element |
the UI element to display if expression = TRUE |
if expression==TRUE: taglist wrapping passed UI element. If expression == FALSE, empty taglist
# In UI:
somevariable=TRUE
shinyWidgets::panel(
heading="constitutivepanel",
CRUX:::conditionalUI(
somevariable,
shinyWidgets::panel(somevariable, heading="ConditionalPanel")
),
shiny::h1("constitutive title"),
shiny::p("constitutive paragraph")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.