material_modal: Place UI content in a modal

Description Usage Arguments Examples

Description

Put any UI object inside of a modal. The modal will open when the button is pressed.

Usage

1
2
3
4
5
6
7
8
9
material_modal(inputId, content, footer = NULL, fixedFooter = FALSE,
  bgcolor = "grey lighten-4", ...)

material_modal_trigger(tagList, triggerId)

material_modal_close(tagList)

update_material_modal(inputId, content = NULL,
  session = shiny::getDefaultReactiveDomain())

Arguments

inputId

String. The ID for the modal. Must be unique per application.

content

The UI elements to place in the modal

footer

The UI elements to place in the footer

fixedFooter

Logical. Should the footer be fixed?

bgcolor

Body background color. Leave blank for "grey lighten-4" color. Visit http://materializecss.com/color.html for a list of available colors.

...

tagList. Aditional tag elements.

tagList

A tagList (button) to trigger/close the modal

triggerId

The Id to be triggered.

session

Shiny default reactive domain.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(materializer)
material_modal(
  inputId = "modal",
  content = shiny::tags$p("Modal Content"),
  footer = material_modal_close(
    material_button("close", icon = "close", class = "flat")
  )
)
material_modal_trigger(
  triggerId = "modal",
  material_button("show", icon = "open_in_new", class = "round")
)

TuSKan/materializer documentation built on May 17, 2019, 6:35 p.m.