material_button: Create a shinymaterial button

Description Usage Arguments See Also Examples

View source: R/shiny-material-button.R

Description

Build a shinymaterial button. The initial value is zero, and increases by one on each press.

Usage

1
material_button(input_id, label, icon = NULL, depth = NULL, color = NULL)

Arguments

input_id

String. The input identifier used to access the value.

label

String. The button text.

icon

String. The name of the icon. Leave empty for no icon. Visit https://materializecss.com/icons.html for a list of available icons.

depth

Integer. The amount of depth of the button. The value should be between 0 and 5. Leave empty for the default depth.

color

String. The color of the button. Leave empty for the default color. Visit https://materializecss.com/color.html for a list of available colors.

See Also

update_material_button

Examples

1
2
3
4
5
6
7
material_button(
  input_id = "example_button",
  label = "Button",
  icon = "cloud",
  depth = 5,
  color = "blue lighten-2"
)

Example output

<button class="waves-effect waves-light btn shiny-material-button z-depth-5 blue lighten-2" id="example_button" value="0">
  <i class="material-icons left">cloud</i>
  Button
</button>

shinymaterial documentation built on Sept. 1, 2020, 1:07 a.m.