bulmaButtonBadge: bulma Button Badge

Description Usage Arguments Author(s) Examples

View source: R/bulma-buttonBadge.R

Description

Create a button with a badge https://wikiki.github.io/elements/badge/.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
bulmaButtonBadge(
  label = NULL,
  url = NULL,
  color = NULL,
  style = NULL,
  loading = FALSE,
  size = NULL,
  badge_color = NULL,
  badge_style = NULL,
  badge_size = NULL,
  badge_position = NULL,
  badge_text = NULL
)

Arguments

label

button label.

url

The url of the button.

color

Color of the button : link, info, primary, warning, danger, success, black, dark and ligth.

style

Style of the button : outlined.

loading

if the button is loading or not.

size

Size of the button : small,medium and large.

badge_color

Color of the button : link, info, primary, warning, danger, success, black, dark and ligth.

badge_style

Style of the button : outlined.

badge_size

Size of the button : small,medium and large.

badge_position

Position of the badge : left, bottom-left and bottom. Right by default.

badge_text

Badge content: avoid too large content (a number is better).

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
if (interactive()) {
 library(shiny)

 ui <- bulmaPage(
  bulmaContainer(
   bulmaColumns(
   bulmaColumn(
    width = 2,
    bulmaButtonBadge(label = "test",
                     url = "http://google.com", color = "danger", style = NULL, loading = FALSE,
                     size = NULL, badge_color = "warning", badge_style = NULL,
                     badge_size = NULL, badge_position = NULL, badge_text = 1
    ),
    br(), br(),

    bulmaButtonBadge(label = "test",
                     url = NULL, color = "warning", style = "outlined", loading = FALSE,
                     size = "small", badge_color = "info", badge_style = NULL,
                     badge_size = NULL, badge_position = NULL, badge_text = 2
    ),
    br(), br(),

    bulmaButtonBadge(label = "test",
                     url = NULL, color = "success", style = NULL, loading = FALSE,
                     size = "medium", badge_color = "danger", badge_style = NULL,
                     badge_size = NULL, badge_position = NULL, badge_text = 3
    )
    ),
    bulmaColumn(
      width = 2,
      bulmaButtonBadge(label = "test",
                       url = NULL, color = "black", style = "outlined", loading = FALSE,
                       size = "large", badge_color = NULL, badge_style = NULL,
                       badge_size = NULL, badge_position = NULL, badge_text = 4
      ),
      br(), br(),

      bulmaButtonBadge(label = "test",
                       url = NULL, color = "info", style = NULL, loading = FALSE,
                       size = NULL, badge_color = "success", badge_style = NULL,
                       badge_size = "small", badge_position = NULL, badge_text = 5
      ),
      br(), br(),

      bulmaButtonBadge(label = "test",
                       url = NULL, color = NULL, style = "outlined", loading = FALSE,
                       size = NULL, badge_color = "warning", badge_style = NULL,
                       badge_size = "medium", badge_position = "left", badge_text = 6
      )
    ),
    bulmaColumn(
      width = 2,
      bulmaButtonBadge(label = "test",
                       url = NULL, color = NULL, style = "primary", loading = TRUE,
                       size = NULL, badge_color = NULL, badge_style = "outlined",
                       badge_size = "large", badge_position = "botton", badge_text = NULL
      )
    )
   )
  )
 )

 server <- function(input, output, session) {

 }

 shinyApp(ui = ui, server = server)

}

JohnCoene/shinybulma documentation built on Oct. 17, 2020, 8:57 p.m.