fab_button: Create a FAB button

Description Usage Arguments Examples

View source: R/fab_button.R

Description

Create a fixed button in bottom right corner with additional button(s) in it

Usage

1
fab_button(..., inputId = NULL, icon = NULL, status = "default")

Arguments

...

HTML tags 'a' or 'button' or actionButton (with NULL labels).

inputId

Id for the FAB button (act like an actionButton).

icon

An icon for the main button.

status

Bootstra^p status to apply to the main button.

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

  ui <- fluidPage(

    tags$h1("FAB button"),

    tags$p("FAB button:"),
    verbatimTextOutput(outputId = "res_fab"),

    tags$p("Logout button:"),
    verbatimTextOutput(outputId = "res_logout"),

    tags$p("Info button:"),
    verbatimTextOutput(outputId = "res_info"),

    fab_button(
      actionButton(
        inputId = "logout",
        label = NULL,
        tooltip = "Logout",
        icon = icon("sign-out")
      ),
      actionButton(
        inputId = "info",
        label = NULL,
        tooltip = "Information",
        icon = icon("info")
      ),
      inputId = "fab"
    )

  )

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

    output$res_fab <- renderPrint({
      input$fab
    })

    output$res_logout <- renderPrint({
      input$logout
    })

    output$res_info <- renderPrint({
      input$info
    })

  }

  shinyApp(ui, server)
}

eppofahmi/kedatalogin documentation built on Oct. 5, 2020, 4:40 p.m.