Build a Framework7 container for floating action button (FAB)

f7Fabs(
  ...,
  id = NULL,
  position = c("right-top", "right-center", "right-bottom", "left-top", "left-center",
    "left-bottom", "center-center", "center-top", "center-bottom"),
  color = NULL,
  extended = FALSE,
  label = NULL,
  sideOpen = c("left", "right", "top", "bottom", "center"),
  morph = FALSE,
  morphTarget = NULL
)

Arguments

...

Slot for f7Fab.

id

Optional: access the current state of the f7Fabs container.

position

Container position.

color

Container color.

extended

If TRUE, the FAB will be wider. This allows to use a label (see below).

label

Container label. Only if extended is TRUE.

sideOpen

When the container is pressed, indicate where buttons are displayed.

morph

Whether to allow the FAB to transofrm into another UI element.

morphTarget

CSS selector of the morph target: ".toolbar" for instance.

Note

The background color might be an issue depending on the parent container. Consider it experimental.

Author

David Granjon, dgranjon@ymail.com

Examples

if(interactive()){ library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "Floating action buttons", f7SingleLayout( navbar = f7Navbar(title = "f7Fabs"), f7Fabs( extended = TRUE, label = "Menu", position = "center-top", color = "yellow", sideOpen = "right", lapply(1:4, function(i) f7Fab(paste0("btn", i), i)) ), lapply(1:4, function(i) verbatimTextOutput(paste0("res", i))), f7Fabs( position = "center-center", color = "purple", sideOpen = "center", lapply(5:8, function(i) f7Fab(paste0("btn", i), i)) ), lapply(5:8, function(i) verbatimTextOutput(paste0("res", i))), f7Fabs( position = "left-bottom", color = "pink", sideOpen = "top", lapply(9:12, function(i) f7Fab(paste0("btn", i), i)) ) ) ), server = function(input, output) { lapply(1:12, function(i) { output[[paste0("res", i)]] <- renderPrint(input[[paste0("btn", i)]]) }) } ) }