metroTile: Create a Metro 4 Tile

Description Usage Arguments Author(s) Examples

View source: R/metro-tiles.R

Description

Build a Metro tile

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
metroTile(
  ...,
  title = NULL,
  icon = NULL,
  url = NULL,
  size = c("small", "medium", "wide", "large"),
  color = NULL,
  selected = FALSE,
  cover = NULL,
  col_position = NULL,
  row_position = NULL
)

Arguments

...

Any UI element.

title

Tile title.

icon

Tile icon.

url

Tile external link.

size

Tile size. Choose among small, medium, wide or large.

color

Tile color.

selected

Whether the tile starts selected or not. FALSE by default.

cover

Image path or url that will cover the tile.

col_position

When tiles are in a grid and group, give the column position of the current tile.

row_position

When tiles are in a grid and group, give the row position of the current tile.

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
if(interactive()){
 library(shiny)
 library(shinyMetroUi)

 shiny::shinyApp(
   ui = metroPage(
    metroTile(
     size = "small",
     color = "red",
     title = "My tile",
     icon = "apps"
    ),
    metroTile(
     size = "small",
     color = "green",
     metroBadge(1, color = "yellow", position = "inline")
    ),
    metroTile(size = "small", color = "blue"),
    metroTile(size = "small", color = "orange")
   ),
   server = function(input, output) {}
 )
}

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