Skip to content

Commit

Permalink
expressify: api-examples/panel_conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Jan 24, 2024
1 parent 930759c commit 81f0314
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions shiny/api-examples/panel_conditional/app-express.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from shiny.express import input, ui

ui.input_checkbox("show", "Show radio buttons", False)

with ui.panel_conditional("input.show"):
ui.input_radio_buttons("radio", "Choose ", ["slider", "select"])

with ui.panel_conditional("input.show && input.radio === 'slider'"):
ui.input_slider("slider", None, min=0, max=100, value=50)

with ui.panel_conditional("input.show && input.radio === 'select'"):
ui.input_select("slider", None, ["A", "B", "C"])

0 comments on commit 81f0314

Please sign in to comment.