f7Swipeout | R Documentation |
f7Swipeout
is designed to be used in combination with f7ListItem.
f7SwipeoutItem
is inserted in f7Swipeout.
f7Swipeout(
tag,
...,
left = NULL,
right = NULL,
side = c("left", "right", "both")
)
f7SwipeoutItem(id, label, color = NULL)
tag |
Tag to be swiped. |
... |
When side is either "right" or "left" use this slot to pass f7SwipeoutItem. |
left |
When side is "both", put the left f7SwipeoutItem. |
right |
When side is "both", put the right f7SwipeoutItem. |
side |
On which side to swipe: "left", "right" or "both". |
id |
Item unique id. |
label |
Item label. |
color |
Item color. |
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Swipeout",
f7SingleLayout(
navbar = f7Navbar(title = "Swipeout"),
# simple list
f7List(
lapply(1:3, function(j) {
if (j == 1) {
f7Swipeout(
tag = f7ListItem(letters[j]),
side = "left",
f7SwipeoutItem(id = "alert", color = "pink", "Alert"),
f7SwipeoutItem(id = "notification", color = "green", "Notif")
)
} else {
f7ListItem(letters[j])
}
})
)
)
),
server = function(input, output, session) {
observe({
print(input$alert)
print(input$notification)
})
observeEvent(input$notification, {
f7Notif(
text = "test",
icon = f7Icon("bolt_fill"),
title = "Notification",
subtitle = "A subtitle",
titleRightText = "now"
)
})
observeEvent(input$alert, {
f7Dialog(
title = "Dialog title",
text = "This is an alert dialog"
)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.