Creates an interactive dock view widget that enables flexible layout management with draggable, resizable, and dockable panels. This is a wrapper around the dockview.dev JavaScript library, providing a powerful interface for creating IDE-like layouts in Shiny applications or R Markdown documents.
Usage
dock_view(
panels = list(),
...,
theme = c("light-spaced", "light", "abyss", "abyss-spaced", "dark", "vs", "dracula",
"nord", "nord-spaced", "catppuccin-mocha", "catppuccin-mocha-spaced", "monokai",
"solarized-light", "solarized-light-spaced", "github-dark", "github-dark-spaced",
"github-light", "github-light-spaced"),
edge_groups = list(),
add_tab = new_add_tab_plugin(),
width = NULL,
height = NULL,
elementId = NULL
)Arguments
- panels
An unnamed list of
panel().- ...
Other options. See https://dockview.dev/docs/api/dockview/options/.
- theme
Theme. One of
c("light-spaced", "light", "abyss", "abyss-spaced", "dark", "vs", "dracula", "nord", "nord-spaced", "catppuccin-mocha", "catppuccin-mocha-spaced", "monokai", "solarized-light", "solarized-light-spaced", "github-dark", "github-dark-spaced", "github-light", "github-light-spaced").- edge_groups
Optional unnamed list of
edge_group()objects to pin to the edges (left, right, top, bottom) of the dock at initialisation. A panel joins one by referencing its id withposition = list(referenceGroup = "<edge-group-id>"), with nodirection. See https://dockview.dev/docs/core/groups/edgeGroups.- add_tab
Globally controls the add tab behavior. List with enable and callback. Enable is a boolean, default to FALSE and callback is a JavaScript function passed with JS. See
default_add_tab_callback(). By default, the callback sets a Shiny inputinput[["<dock_ID>_panel-to-add"]]so you can create observers with custom logic.- width
Widget width.
- height
Widget height.
- elementId
When used outside Shiny.