-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathprettyRadioButtons.R
78 lines (71 loc) · 1.8 KB
/
prettyRadioButtons.R
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
70
71
72
73
74
75
76
77
78
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
tags$h1("Pretty radio buttons"),
br(),
fluidRow(
column(
width = 4,
prettyRadioButtons(
inputId = "radio1",
label = "Click me!",
choices = c("Click me !", "Me !", "Or me !")
),
verbatimTextOutput(outputId = "res1"),
br(),
prettyRadioButtons(
inputId = "radio4",
label = "Click me!",
choices = c("Click me !", "Me !", "Or me !"),
outline = TRUE,
plain = TRUE,
icon = icon("thumbs-up")
),
verbatimTextOutput(outputId = "res4")
),
column(
width = 4,
prettyRadioButtons(
inputId = "radio2",
label = "Click me!",
thick = TRUE,
choices = c("Click me !", "Me !", "Or me !"),
animation = "pulse",
status = "info"
),
verbatimTextOutput(outputId = "res2"),
br(),
prettyRadioButtons(
inputId = "radio5",
label = "Click me!",
icon = icon("check"),
choices = c("Click me !", "Me !", "Or me !"),
animation = "tada",
status = "default"
),
verbatimTextOutput(outputId = "res5")
),
column(
width = 4,
prettyRadioButtons(
inputId = "radio3",
label = "Click me!",
choices = c("Click me !", "Me !", "Or me !"),
shape = "round",
status = "danger",
fill = TRUE,
inline = TRUE
),
verbatimTextOutput(outputId = "res3")
)
)
)
server <- function(input, output, session) {
output$res1 <- renderPrint(input$radio1)
output$res2 <- renderPrint(input$radio2)
output$res3 <- renderPrint(input$radio3)
output$res4 <- renderPrint(input$radio4)
output$res5 <- renderPrint(input$radio5)
}
if (interactive())
shinyApp(ui, server)