metroCharms: Create a Metro 4 charms

Description Usage Arguments Author(s) Examples

View source: R/metroCharms.R

Description

Build a Metro charms

Usage

1
2
3
4
5
6
7
metroCharms(
  ...,
  id,
  position = c("right", "left", "top", "bottom"),
  opacity = NULL,
  background = "back"
)

Arguments

...

Any UI element.

id

Charms unique id. Needed by the charmsToggle.

position

Charms position: right, left, top or bottom.

opacity

Charms opacity. NULL by default. Between 0 and 1.

background

Charms background color. "black" by default.

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

 shiny::shinyApp(
   ui = metroPage(
    br(), br(), br(), br(),
    charmsToggle(id = "mycharm", "Toggle charms"),
    metroCharms(
     id = "mycharm",
     background = "dark",
     position = "top",
     opacity = "0.5",
     sliderInput(
      "obs",
      "Number of observations:",
      min = 0,
      max = 1000,
      value = 500
     )
    )
   ),
   server = function(input, output) {}
 )
}

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