The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
shiny.element brings Element Plus 2.14.7 – its inputs, tables, trees, menus, dialogs and the rest – to Shiny. Each component reports through input$<id> and is updated from the server, like any other Shiny input. Element Plus, its icons and Vue 3.5 ship inside the package, so an app needs no network.
install.packages("shiny.element")
# or the development version
remotes::install_github("kaipingyang/shiny.element")el_page() is the page: it loads Vue and Element Plus and gives the page Element Plus’s look.
library(shiny)
library(shiny.element)
ui <- el_page(
el_input("name", label = "Name", placeholder = "Your name", width = "300px"),
el_rate("score", label = "Score", value = 3),
el_button("save", "Save", type = "primary"),
tags$div(style = "height: 12px"),
el_alert("hint", title = "Nothing saved yet", type = "info", closable = FALSE)
)
server <- function(input, output, session) {
observeEvent(input$save, {
update_el_alert(
id = "hint",
type = "success",
title = paste0("Saved ", input$name, " (", input$score, "/5)")
)
})
}
shinyApp(ui, server)Inside another page function – fluidPage(), bslib’s page_sidebar() – call use_element() once instead, giving it the page’s theme so Element follows it:
theme <- el_theme(primary = "#7c3aed")
ui <- bslib::page_sidebar(
theme = theme,
use_element(theme = theme),
sidebar = bslib::sidebar(el_select("metric", choices = c("Mean", "Median"))),
el_table(data = head(iris))
)A component with a value reports it as input$<id>, on load and on change. The server changes it with the matching update_el_*(), runs one of Element’s methods with call_el(), and shows a message, a notification or a question with el_message(), el_notification() and el_message_box(). Element’s events arrive as input$<id>_<event>.
server <- function(input, output, session) {
output$chosen <- renderText(input$city) # read
observeEvent(input$reset, update_el_select(id = "city", selected = "Beijing"))
observeEvent(input$clear, call_el(id = "orders", method = "clearSelection"))
observeEvent(input$orders_row_click, el_message(message = "Row clicked"))
}el_form(), shinyvalidate, dates.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.