Skip to content

Updating options from inputs #280

@Aariq

Description

@Aariq

For example, how would one implement a toggle to switch between light and dark mode? In bslib one can do something like the following in the server funciton:

observe({
    session$setCurrentTheme(
      if (input$dark_mode) {
        dark
      } else {
        light
      }
    )
  })

Is there an equivalent or some other way of updating the options argument dynamically?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions