shinyGizmo is an R package providing useful components for Shiny applications.
From CRAN:
install.packages("shinyGizmo")
Latest development version from Github:
remotes::install_github(
"r-world-devs/shinyGizmo"
)
Allows to attach conditional JavaScript action to be run on UI element.
Use predefined actions such as disable, attachClass, css, show,
runAnimation or define a custom one.
Improves application performance when large amount text is passed to
text area. Works great with valueButton.
Build responsive layouts that adapt based on the container’s own
dimensions rather than the viewport using CSS Container
Queries
and CSS Grid
Layout.
Combine container() with condition() to define CSS rules at
different breakpoints, and use grid() / grid_item() as composable
helpers for CSS Grid layouts.
container(
name = "dashboard",
color = "#b5c5e7ff",
div(class = "sidebar", "Sidebar", style = "background-color:#d4f89b;") |> grid_item(area = "sidebar"),
div(class = "main", "Main content", style = "background-color:#b5c5e7;") |> grid_item(area = "main"),
conditions = list(
condition(
!!!grid(
template_areas = list(c("sidebar", "main")),
template_columns = "200px 1fr",
gap = "16px"
),
`font-size` = "20px"
),
condition(
query = "width < 700px",
!!!grid(
template_areas = list(c("sidebar"), c("main")),
gap = "12px"
),
`font-size` = "12px"
)
)
)Key features: - container() - wraps elements with container-type
/ container-name for CSS Container Queries - condition() -
defines CSS rules for a specific container query (or unconditionally
when query = NULL); supports .extra_css for targeting child
selectors - grid() - generates CSS Grid properties
(template_areas, template_columns, auto_fill, etc.) as a named
list for splicing into condition() via !!! - grid_item() -
pipe-friendly helper to set grid-area, grid-row, grid-column on
individual elements
See examples/container.R for a full demo app with nested containers,
auto-fill grids, and explicit row/column spanning.
shinyGizmo is stable but we’re still developing the package. If you find bugs or have any suggestions for future releases post an issue on GitHub page at https://github.com/r-world-devs/shinyGizmo/issues.
There are two main ways to get help with shinyGizmo
- Reach the package author via email: krystian8207@gmail.com.
- Post an issue on our GitHub page at https://github.com/r-world-devs/shinyGizmo.










