metroTilesGrid: Create a Metro 4 Tiles Grid

Description Usage Arguments Author(s) Examples

View source: R/metro-tiles.R

Description

Build a Metro grid for tiles

Usage

1

Arguments

...

Insert metroTile inside.

group

Whether tiles are displayed by group. FALSE by default.

title

If group is TRUE, the group title.

size

Tile group size: between 1 and 10.

Author(s)

David Granjon, dgranjon@ymail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if(interactive()){
 library(shiny)
 library(shinyMetroUi)

 shiny::shinyApp(
   ui = metroPage(
    metroTilesGrid(
     metroTile(size = "small", color = "red"),
     metroTile(size = "small", color = "green"),
     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 = "brown"),
     metroTile(size = "medium", color = "green", selected = TRUE)
    ),
    br(), br(), br(),
    metroTilesGrid(
     group = TRUE,
     size = 2,
     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")
     )
    )
   ),
   server = function(input, output) {
    output$distPlot <- renderPlot({
     hist(rnorm(input$obs))
    })
   }
 )
}

RinteRface/shinyMetroUi documentation built on Dec. 31, 2019, 8:47 a.m.