grillade-package: Grid System for the Web

Description Shiny Markdown Note Author(s) Examples

Description

Grid sytem for 'shiny' applications or 'rmarkdown' document and to create 'htmlwidgets' matrix.

Shiny

grillade can be used in UI but also in server with grilladeOutput/renderGrillade.

Markdown

grillade can be used directly in a markdown document with htmlwidgets or HTML tags or with Pandoc's fenced div: \:\:\:\: and normal chunks.

Note

CSS code used by grillade is from KNACSS.

Author(s)

Victor Perrier (@dreamRs_fr)

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
library(grillade)

box_example <- function(...) {
  tags$div(
    style = "box-sizing:border-box;border:5px solid #1C6EA4;height:100%;",
    ...
  )
}

# Using autogrid: as many columns as elements
grillade(
  box_example("Column 1"),
  box_example("Column 2"),
  box_example("Column 3"),
  box_example("Column 4"),
  box_example("Column 5")
)

# Custom number of cols and elements
grillade(
  n_col = 3,
  knack(
    cols = 2,
    box_example("Column 1")
  ),
  box_example("Column 2"),
  box_example("Column 3"),
  knack(
    cols = 2,
    rows = 2,
    box_example("Column 4")
  ),
  box_example("Column 5")
)

dreamRs/grillade documentation built on May 2, 2020, 11:09 a.m.