Build a Metro window

metroWindow(
  ...,
  title = NULL,
  icon = NULL,
  shadow = TRUE,
  header_color = NULL,
  content_color = NULL,
  content_text_color = NULL,
  minimize = TRUE,
  closable = TRUE,
  draggable = FALSE,
  resizable = FALSE,
  width = NULL,
  height = NULL
)

Arguments

...

Any UI element.

title

Window title.

icon

Window icon.

shadow

Whether to display a shadow around the window. TRUE by default.

header_color

Header background color.

content_color

Content background color.

content_text_color

Content text color.

minimize

Whether the window can be minimized. TRUE by default.

closable

Whether the window can be closed. TRUE by default.

draggable

Whether the window can be dragged. FALSE by default.

resizable

Whether the window can be resized. FALSE by default.

width

Window width.

height

Window height.

Note

It is better to use only 2 windows per page and embed them as in the example below.

Examples

if(interactive()){ library(shiny) library(shinyMetroUi) shiny::shinyApp( ui = metroPage( allow_loading = TRUE, fluidRow( metroCell( metroWindow( title = "Window", resizable = TRUE, width = "100%", header_color = "red", content_color = "black", content_text_color = "yellow", # content metroTilesGrid( metroTile( size = "small", color = "indigo", icon = "github", url = "https://github.com/olton/Metro-UI-CSS"), metroTile(size = "small", color = "green", icon = "envelop"), metroTile(size = "small", color = "blue", col_position = 1, row_position = 2), metroTile(size = "small", color = "orange", col_position = 2, row_position = 2), metroTile( size = "wide", color = "pink", sliderInput("obs", "Number of observations:", min = 0, max = 1000, value = 500 ) ), metroTile( size = "large", color = "green", selected = TRUE, plotOutput("distPlot") ) ) ) ), metroCell( metroWindow( title = "Window", resizable = TRUE, width = "100%", header_color = "red", content_color = "black", content_text_color = "yellow", # content metroTilesGrid( metroTile(size = "large",color = "brown", icon = "windows"), metroTile(size = "wide", color = "crimson", icon = "envelop"), metroTile(size = "small", color = "cobalt", col_position = 1, row_position = 2), metroTile(size = "small", color = "olive", col_position = 2, row_position = 2) ) ) ) ) ), server = function(input, output) { output$distPlot <- renderPlot({ hist(rnorm(input$obs)) }) } ) }