Skip to contents

Scoutbar react widget for Shiny.

Use this function from the server side of your Shiny app to update a scoutbar.

Usage

scoutbar(
  inputId,
  theme = c("light", "dark", "auto"),
  placeholder = list("Hello", "Type some text"),
  actions = list(),
  ...
)

update_scoutbar(session = shiny::getDefaultReactiveDomain(), inputId, ...)

Arguments

inputId

Widget input id.

theme

Scoutbar theme.

placeholder

Scoutbar placeholder text. A string or a list of strings.

actions

Scoutbar actions. Expect scout_action or scout_section and scout_page. scout_action can be nested inside scout_section and scout_page.

...

Scoutbar configuration. Expect a list of properties like in scoutbar. See possible values here at https://www.scoutbar.co/docs/features.

session

Shiny session object.

Value

A list of shiny tags containing all the web dependencies and scoutbar elements required to instantiate the Scoutbar React widget from JavaScript.

This function is called for its side effect. It sends a message to JavaScript through the current websocket connection, leveraging the shiny session object.

Details

Provides a contextual menu users can activate with keyboard shortcut or prommatically with update_scoutbar. Scoutbar may be seen as an alternative to sidebars and navbars, as it allows to construct better navigation menus.