A Framework7 segmented button container for f7Button.
Usage
f7Segment(
...,
container = c("segment", "row"),
shadow = FALSE,
rounded = FALSE,
strong = FALSE
)
Arguments
- ...
Slot for f7Button.
- container
Either "row" or "segment".
- shadow
Button shadow. FALSE by default. Only if the container is segment.
- rounded
Round style. FALSE by default. Only if the container is segment.
- strong
Strong style. FALSE by default.
Author
David Granjon, dgranjon@ymail.com
Examples
if(interactive()){
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Button Segments",
f7SingleLayout(
navbar = f7Navbar(title = "f7Segment, f7Button"),
f7BlockTitle(title = "Simple Buttons in a row container"),
f7Segment(
container = "row",
f7Button(color = "blue", label = "My button", fill = FALSE),
f7Button(color = "green", label = "My button", href = "https://www.google.com", fill = FALSE),
f7Button(color = "yellow", label = "My button", fill = FALSE)
),
f7BlockTitle(title = "Filled Buttons in a segment/rounded container"),
f7Segment(
rounded = TRUE,
container = "segment",
f7Button(color = "black", label = "Action Button", inputId = "button2"),
f7Button(color = "green", label = "My button", href = "https://www.google.com"),
f7Button(color = "yellow", label = "My button")
),
f7BlockTitle(title = "Outline Buttons in a segment/shadow container"),
f7Segment(
shadow = TRUE,
container = "segment",
f7Button(label = "My button", outline = TRUE, fill = FALSE),
f7Button(label = "My button", outline = TRUE, fill = FALSE),
f7Button(label = "My button", outline = TRUE, fill = FALSE)
),
f7BlockTitle(title = "Buttons in a segment/strong container"),
f7Segment(
strong = TRUE,
container = "segment",
f7Button(label = "My button", fill = FALSE),
f7Button(label = "My button", fill = FALSE),
f7Button(label = "My button", fill = FALSE, active = TRUE)
),
f7BlockTitle(title = "Rounded Buttons in a segment container"),
f7Segment(
container = "segment",
f7Button(color = "blue", label = "My button", rounded = TRUE),
f7Button(color = "green", label = "My button", rounded = TRUE),
f7Button(color = "yellow", label = "My button", rounded = TRUE)
),
f7BlockTitle(title = "Buttons of different size in a row container"),
f7Segment(
container = "row",
f7Button(color = "pink", label = "My button", shadow = TRUE),
f7Button(color = "purple", label = "My button", size = "large", shadow = TRUE),
f7Button(color = "orange", label = "My button", size = "small", shadow = TRUE)
),
br(), br(),
f7BlockTitle(title = "Click on the black action button to update the value"),
verbatimTextOutput("val")
)
),
server = function(input, output) {
output$val <- renderPrint(input$button2)
}
)
}