Draggable, resizable panels. When inputId is set, input$<inputId> is a
numeric vector of panel sizes (fired on drag release).
Usage
shad_resizable(
inputId = NULL,
...,
orientation = c("horizontal", "vertical"),
class = NULL
)
shad_resizable_panel(
...,
default_size = NULL,
min_size = NULL,
max_size = NULL
)
shad_resizable_handle(with_handle = TRUE)Arguments
- inputId
Optional input id (binds panel sizes when set).
- ...
shad_resizable_panel()andshad_resizable_handle()children.- orientation
"horizontal"(default) or"vertical".- class
Extra CSS classes.
- default_size
Initial size (percentage 0-100).
- min_size, max_size
Optional size bounds (percentage).
- with_handle
If
TRUE, render the visible grip.
See also
Other shadshiny tier-3 components:
shad_accordion(),
shad_alert_dialog(),
shad_carousel(),
shad_collapsible(),
shad_command(),
shad_command_palette(),
shad_context_menu(),
shad_dialog(),
shad_drawer(),
shad_dropdown_menu(),
shad_hover_card(),
shad_menu_parts,
shad_menubar(),
shad_message_scroller(),
shad_navigation_menu(),
shad_pagination(),
shad_popover(),
shad_scroll_area(),
shad_sheet(),
shad_sidebar_layout(),
shad_tabs(),
shad_tooltip()
Examples
shad_resizable("r",
shad_resizable_panel("One", default_size = 50),
shad_resizable_handle(),
shad_resizable_panel("Two", default_size = 50))
#> <div class="shad-resizable" data-shad="resizable" id="r" data-orientation="horizontal">
#> <div class="shad-resizable__panel" data-size="50">One</div>
#> <div class="shad-resizable__handle"><span class="shad-resizable__grip" aria-hidden="true"><svg width="6" height="10" viewBox="0 0 6 10" fill="currentColor" aria-hidden="true"><circle cx="1.5" cy="2" r="1"/><circle cx="4.5" cy="2" r="1"/><circle cx="1.5" cy="5" r="1"/><circle cx="4.5" cy="5" r="1"/><circle cx="1.5" cy="8" r="1"/><circle cx="4.5" cy="8" r="1"/></svg></span></div>
#> <div class="shad-resizable__panel" data-size="50">Two</div>
#> </div>