survey_panel_ui() is a card with the title, the progress cue, the chat,
and the form. It starts with the first view in set_config(views = ).
With more than one view, the header has one icon button for each view, in
the order of views. On a narrow screen, the side-by-side view puts the
chat below the form. Pair it with
survey_server() with the same id.
Details
The card fills its container. In a page that does not fill the window,
put it in a bslib::as_fill_carrier() with a height.
See also
survey_chat_ui() for the chat alone. The "panel-chat-form"
example of run_example() puts the card in a plain page.
Examples
if (FALSE) { # interactive() && rlang::is_installed("RSQLite")
library(shiny)
library(bslib)
ui <- page_fixed(
as_fill_carrier(div(
style = "max-width: 640px; height: 80vh; margin: 2rem auto;",
survey_panel_ui("survey")
))
)
}
