Shiny Express API

This page outlines Shiny Express’s API reference.

Compared to Shiny Core, Shiny Express is a simpler way to learn and create basic apps, but it is less flexible and powerful.

For an introduction to Shiny, see the tutorial.

Function reference

Input components

Gather user input.

express.ui.input_select Create a select list that can be used to choose a single or multiple items from a list of values.
express.ui.input_selectize Create a select list that can be used to choose a single or multiple items from a list of values.
express.ui.input_slider Constructs a slider widget to select a number, date, or date-time from a range.
express.ui.input_dark_mode Creates a dark mode switch input that toggles the app between dark and light modes.
express.ui.input_date Creates a text input which, when clicked on, brings up a calendar that the user can click on to select dates.
express.ui.input_date_range Creates a pair of text inputs which, when clicked on, bring up calendars that the user can click on to select dates.
express.ui.input_checkbox Create a checkbox that can be used to specify logical values.
express.ui.input_checkbox_group Create a group of checkboxes that can be used to toggle multiple choices independently.
express.ui.input_switch Create a switch that can be used to specify logical values. Similar to input_checkbox, but implies to the user that the change will take effect immediately.
express.ui.input_radio_buttons Create a set of radio buttons used to select an item from a list.
express.ui.input_numeric Create an input control for entry of numeric values.
express.ui.input_text Create an input control for entry of text values.
express.ui.input_text_area Create a textarea input control for entry of unstructured text values.
express.ui.input_password Create an password control for entry of passwords.
express.ui.input_action_button Creates an action button whose value is initially zero, and increments by one each time it is pressed.
express.ui.input_action_link Creates a link whose value is initially zero, and increments by one each time it is pressed.
express.ui.input_task_button Creates a button for launching longer-running operations.

Output components

Reactively render output.

express.render.plot Reactively render a plot object as an HTML image.
express.render.table Reactively render a pandas DataFrame object (or similar) as a basic HTML table.
express.render.DataTable Holds the data and options for a data_frame output, for a spreadsheet-like view.
express.render.data_frame Decorator for a function that returns a pandas, polars, or eager narwhals compatible DataFrame object to render as an interactive table or grid. Features fast virtualized scrolling, sorting, filtering, and row selection (single or multiple).
express.render.DataGrid Holds the data and options for a data_frame output, for a spreadsheet-like view.
express.render.text Reactively render text.
express.render.ui Reactively render HTML content.
express.render.download Decorator to register a function to handle a download.
express.render.image Reactively render a image file as an HTML image.
express.render.express Reactively render HTML content with output captured as in Shiny Express

Layouts and other UI tools

Tools for creating, arranging, and styling UI components.

express.ui.page_opts Set page-level options for the current app.
express.ui.sidebar Context manager for sidebar element
express.ui.layout_columns Context manager for responsive, column-based grid layouts, based on a 12-column grid.
express.ui.layout_column_wrap Context manager for a grid-like, column-first layout
express.ui.card Context manager for Bootstrap card component
express.ui.card_header Context manager for a card header container
express.ui.card_footer Context manager for a card footer container
express.ui.value_box Context manager for a value box
express.ui.value_box_theme Value box theme
express.ui.popover Context manager for a popover
express.ui.tooltip Context manager for a tooltip
express.ui.accordion Context manager for a vertically collapsing accordion.
express.ui.accordion_panel Context manager for single accordion panel.
express.ui.layout_sidebar Context manager for sidebar layout

Chat interface

Build a chatbot interface

express.ui.Chat Create a chat interface.

Reactive programming

Create reactive functions and dependencies.

reactive.calc Mark a function as a reactive calculation.
reactive.effect Mark a function as a reactive side effect.
reactive.value Create a reactive value.
reactive.event Mark a function to react only when an “event” occurs.
reactive.isolate Create a non-reactive scope within a reactive scope.
reactive.invalidate_later Scheduled Invalidation
reactive.extended_task Decorator to mark an async function as a slow computation. This will cause the function to be run in a background asyncio task, and the results will be available via the ExtendedTask object returned by the decorator.
reactive.flush Run any pending invalidations (i.e., flush the reactive environment).
reactive.poll Create a reactive polling object.
reactive.file_reader Create a reactive file reader.
reactive.lock A lock that should be held whenever manipulating the reactive graph.
req Throw a silent exception for falsy values.

Reusable Express code

Create reusable Express code.

express.ui.hold Prevent the display of UI elements in various ways.
express.expressify Decorate a function so that output is captured as in Shiny Express

Update inputs

Programmatically update input values.

express.ui.update_select Change the value of a select input on the client.
express.ui.update_selectize Change the value of a selectize.js powered input on the client.
express.ui.update_slider Change the value of a slider input on the client.
express.ui.update_dark_mode
express.ui.update_date Change the value of a date input on the client.
express.ui.update_date_range Change the start and end values of a date range input on the client.
express.ui.update_checkbox Change the value of a checkbox input on the client.
express.ui.update_checkbox_group Change the value of a checkbox group input on the client.
express.ui.update_switch Change the value of a switch input on the client.
express.ui.update_radio_buttons Change the value of a radio input on the client.
express.ui.update_numeric Change the value of a number input on the client.
express.ui.update_text Change the value of a text input on the client.
express.ui.update_text_area Change the value of a text input on the client.
express.ui.update_navs Change the value of a navs container on the client.
express.ui.update_action_button Change the label and/or icon of an action button on the client.
express.ui.update_action_link Change the label and/or icon of an action link on the client.
express.ui.update_task_button Change the state of a task button on the client.

Update UI Layouts

express.ui.update_sidebar Update a sidebar’s visibility.
express.ui.update_tooltip Update tooltip contents.
express.ui.update_popover Update the contents or title of a popover.
express.ui.update_accordion Dynamically set accordions’ states.
express.ui.update_accordion_panel Dynamically update accordion panel contents.
express.ui.insert_accordion_panel Insert an accordion_panel.
express.ui.remove_accordion_panel Remove an accordion_panel.

Display messages

Display messages to the user.

express.ui.help_text Create a help text element
express.ui.notification_show Show a notification to the user.
express.ui.notification_remove Remove a notification.
express.ui.modal Creates the UI for a modal dialog, using Bootstrap’s modal class.
express.ui.modal_show Show a modal dialog.
express.ui.modal_remove Remove a modal dialog box.
express.ui.modal_button Creates a button that will dismiss a modal.
express.ui.Progress Initialize a progress bar.

Modules

express.module Create a Shiny module using Shiny Express syntax

UI panels

Visually group together a section of UI components.

express.ui.panel_absolute Context manager for a panel of absolutely positioned content.
express.ui.panel_fixed Context manager for a panel of absolutely positioned content.
express.ui.panel_title Create title(s) for the application.
express.ui.panel_well Context manager for a well panel

Uploads & downloads

Allow users to upload and download files.

express.ui.input_file Create a file upload control that can be used to upload one or more files.
express.render.download Decorator to register a function to handle a download.

Dynamic UI

Dynamically show/hide UI elements.

express.ui.panel_conditional Context manager for a conditional panel
express.ui.insert_ui Insert UI objects.
express.ui.remove_ui Remove UI objects.

UI as HTML

Tools for creating HTML/CSS/JS

express.ui.Theme Create a custom Shiny theme.
express.ui.markdown Convert a string of markdown to ui.HTML.
express.ui.include_css Include a CSS file.
express.ui.include_js Include a JavaScript file.
express.ui.HTML Mark a string as raw HTML. This will prevent the string from being escaped when rendered inside an HTML tag.
express.ui.tags Functions for creating HTML tags.
express.ui.TagList Create an HTML tag list (i.e., a fragment of HTML)
express.ui.busy_indicators.use Enable/disable busy indication
express.ui.busy_indicators.options Customize spinning busy indicators.

Application-level settings

express.app_opts Set App-level options in Shiny Express

Express developer tooling

express.is_express_app Detect whether an app file is a Shiny express app
express.wrap_express_app Wrap a Shiny Express mode app into a Shiny App object.