Title: | Shiny UI Widgets for Small Screens |
---|---|
Description: | Provides UI widget and layout functions for writing Shiny apps that work well on small screens. |
Authors: | Joe Cheng [cre, aut], RStudio [cph] |
Maintainer: | Joe Cheng <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1.1 |
Built: | 2025-02-13 04:42:38 UTC |
Source: | https://github.com/cran/miniUI |
Creates a full-width container for one or more buttons. The horizontal space will be evenly divided among any buttons that are added.
miniButtonBlock(..., border = "top")
miniButtonBlock(..., border = "top")
... |
One or more |
border |
Zero or more of |
When using miniButtonBlock
with a miniTabstripPanel
, consider
passing the miniButtonBlock
to miniTabstripPanel
as the
between
argument.
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
library(shiny) miniButtonBlock( actionButton("reset", "Reset to defaults"), actionButton("clear", "Clear all") )
library(shiny) miniButtonBlock( actionButton("reset", "Reset to defaults"), actionButton("clear", "Clear all") )
Creates a panel for containing arbitrary content within a flex box container.
This is mainly useful within miniPage
or a
miniTabPanel
. You can use miniContentPanel
to introduce
padding and/or scrolling, but even if padding/scrolling aren't needed, it's a
good idea to wrap your custom content into miniContentPanel
as it
fixes some odd behavior with percentage-based heights.
miniContentPanel(..., padding = 15, scrollable = TRUE)
miniContentPanel(..., padding = 15, scrollable = TRUE)
... |
UI objects to be contained in the |
padding |
Amount of padding to apply. Can be numeric (in pixels) or
character (e.g. |
scrollable |
If |
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
library(shiny) miniContentPanel(padding = 0, plotOutput("plot", height = "100%") )
library(shiny) miniContentPanel(padding = 0, plotOutput("plot", height = "100%") )
Designed to serve as the outermost function call for your gadget UI. Similar
to fillPage
, but always includes the Bootstrap CSS
library, and is designed to contain miniTitleBar
,
miniTabstripPanel
, miniContentPanel
, etc.
miniPage(..., title = NULL, theme = NULL)
miniPage(..., title = NULL, theme = NULL)
... |
Elements to include within the page. |
title |
The title to use for the browser window/tab (it will not be shown in the document). |
theme |
URL to alternative Bootstrap stylesheet. |
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
miniTabstripPanel
is a tabstrip panel that contains
miniTabPanel
elements. Similar to tabsetPanel
,
but optimized for small page sizes like mobile devices or the RStudio Viewer
pane.
miniTabstripPanel(..., id = NULL, selected = NULL, between = NULL) miniTabPanel(title, ..., value = title, icon = NULL)
miniTabstripPanel(..., id = NULL, selected = NULL, between = NULL) miniTabPanel(title, ..., value = title, icon = NULL)
... |
For |
id |
If provided, you can use |
selected |
The |
between |
A tag or list of tags that should be inserted between the content (above) and tabstrip (below). |
title |
Display title for tab. |
value |
The value that should be sent when |
icon |
Icon to appear on the tab; see |
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
library(shiny) miniTabstripPanel( miniTabPanel("Data", icon = icon("table"), selectInput("dataset", "Data set", ls("package:datasets"))), miniTabPanel("Subset", icon = icon("sliders"), uiOutput("subset_ui") ) )
library(shiny) miniTabstripPanel( miniTabPanel("Data", icon = icon("table"), selectInput("dataset", "Data set", ls("package:datasets"))), miniTabPanel("Subset", icon = icon("sliders"), uiOutput("subset_ui") ) )
Creates a title bar for a Shiny app or Shiny Gadget. Intended to be used with
miniPage
. Title bars contain a title, and optionally, a
miniTitleBarButton
on the left and/or right sides.
miniTitleBar(title, left = NULL, right = NULL) gadgetTitleBar(title, left = miniTitleBarCancelButton(), right = miniTitleBarButton("done", "Done", primary = TRUE)) miniTitleBarButton(inputId, label, primary = FALSE) miniTitleBarCancelButton(inputId = "cancel", label = "Cancel", primary = FALSE)
miniTitleBar(title, left = NULL, right = NULL) gadgetTitleBar(title, left = miniTitleBarCancelButton(), right = miniTitleBarButton("done", "Done", primary = TRUE)) miniTitleBarButton(inputId, label, primary = FALSE) miniTitleBarCancelButton(inputId = "cancel", label = "Cancel", primary = FALSE)
title |
The title of the gadget. If this needs to be dynamic, pass
|
left |
The |
right |
The |
inputId |
The |
label |
The text label to display on the button. |
primary |
If |
gadgetTitleBar
is a miniTitleBar
with different
defaults: a Cancel button on the left and a Done button on the right. By
default, runGadget
will handle the Cancel button by
closing the gadget and raising an error, but the Done
button must be
handled by the gadget author using observeEvent(input$done, {...})
.
miniTitleBarCancelButton
is like miniTitleBarButton
,
but the user can also invoke it by hitting the Escape key.
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
miniTitleBar("My App", left = miniTitleBarButton("prev", "Previous"), right = miniTitleBarButton("next", "Next") )
miniTitleBar("My App", left = miniTitleBarButton("prev", "Previous"), right = miniTitleBarButton("next", "Next") )