All Projects → Yang-Tang → Shinyjqui

Yang-Tang / Shinyjqui

Licence: other
jQuery UI Interactions and Effects for Shiny

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Shinyjqui

Colourpicker
🎨 A colour picker tool for Shiny and for selecting colours in plots (in R)
Stars: ✭ 144 (-36%)
Mutual labels:  shiny
Electricshine
Create Standalone Installable Shiny Apps
Stars: ✭ 165 (-26.67%)
Mutual labels:  shiny
Shinyeffectforugui
Shiny effect of uGUI, which does not need mask or normal map.
Stars: ✭ 204 (-9.33%)
Mutual labels:  shiny
Googleauthr
Google API Client Library for R. Easy authentication and help to build Google API R libraries with OAuth2. Shiny compatible.
Stars: ✭ 150 (-33.33%)
Mutual labels:  shiny
Gglabeller
Shiny gadget for labeling points on ggplot
Stars: ✭ 161 (-28.44%)
Mutual labels:  shiny
Bs grid
Bootstrap Datagrid
Stars: ✭ 184 (-18.22%)
Mutual labels:  jquery-ui
Rtutor
Creating interactive R Problem Sets. Automatic hints and solution checks. (Shiny or RStudio)
Stars: ✭ 141 (-37.33%)
Mutual labels:  shiny
Hallo
Simple rich text editor (contentEditable) for jQuery UI
Stars: ✭ 2,455 (+991.11%)
Mutual labels:  jquery-ui
Plotly
An interactive graphing library for R
Stars: ✭ 2,096 (+831.56%)
Mutual labels:  shiny
Shinystudio
A fully Dockerized, self-hosted development environment for teams. Develop where you serve.
Stars: ✭ 204 (-9.33%)
Mutual labels:  shiny
Jquery Ui Month Picker
jQuery UI Month Picker Plugin
Stars: ✭ 154 (-31.56%)
Mutual labels:  jquery-ui
Explor
Interfaces for Multivariate Analysis in R
Stars: ✭ 157 (-30.22%)
Mutual labels:  shiny
Bslib
Tools for theming shiny and rmarkdown from R via Bootstrap (3 or 4) Sass.
Stars: ✭ 197 (-12.44%)
Mutual labels:  shiny
Shinyalert
🗯️ Easily create pretty popup messages (modals) in Shiny
Stars: ✭ 148 (-34.22%)
Mutual labels:  shiny
Structured Filter
jQuery UI widget for structured queries like "Contacts where Firstname starts with A and Birthday before 1/1/2000 and State in (CA, NY, FL)"...
Stars: ✭ 213 (-5.33%)
Mutual labels:  jquery-ui
Shinyfeedback
display user feedback next to Shiny inputs
Stars: ✭ 143 (-36.44%)
Mutual labels:  shiny
Fresh
Fresh shiny themes
Stars: ✭ 170 (-24.44%)
Mutual labels:  shiny
Ggedit
Interactively edit ggplot layer aesthetics and theme definitions
Stars: ✭ 223 (-0.89%)
Mutual labels:  shiny
Shinymanager
Simple and secure authentification mechanism for single shiny applications.
Stars: ✭ 213 (-5.33%)
Mutual labels:  shiny
Taganomaly
Anomaly detection analysis and labeling tool, specifically for multiple time series (one time series per category)
Stars: ✭ 200 (-11.11%)
Mutual labels:  shiny

shinyjqui

R-CMD-checkTravis-CI Build Status AppVeyor Build Status CRAN_Status_Badge

The shinyjqui package is an R wrapper for jQuery UI javascript library. It allows user to easily add interactions and animation effects to a shiny app.

Installation

You can install the stable version from CRAN, or the development version from github with:

# install from CRAN
install.packages('shinyjqui')

# for the development version
devtools::install_github("yang-tang/shinyjqui")

Usage

# load packages
library(shiny)
library(shinyjqui)
library(ggplot2)
library(highcharter)
  • Draggable: Allow elements to be moved using the mouse
server <- function(input, output) {}

ui <- fluidPage(
  jqui_draggable(fileInput('file', 'File'))
)

shinyApp(ui, server)

  • Resizable: Change the size of an element using the mouse.
server <- function(input, output) {
  output$gg <- renderPlot({
    ggplot(mtcars, aes(x = cyl, y = mpg)) + geom_point()
  })
}

ui <- fluidPage(
  jqui_resizable(plotOutput('gg', width = '200px', height = '200px'))
)

shinyApp(ui, server)

  • Sortable: Reorder elements in a list or grid using the mouse.
server <- function(input, output) {
  output$hc <- renderHighchart({
    hchart(mtcars, "scatter", hcaes(x = cyl, y = mpg, group = factor(vs))) %>% 
      hc_legend(enabled = FALSE)
  })
  output$gg <- renderPlot({
    ggplot(mtcars, aes(x = cyl, y = mpg, color = factor(vs))) + 
      geom_point() + 
      theme(legend.position= "none")
  })
}

ui <- fluidPage(
  jqui_sortable(div(id = 'plots',
                     highchartOutput('hc', width = '200px', height = '200px'),
                     plotOutput('gg', width = '200px', height = '200px')))
)

shinyApp(ui, server)

  • Animation Effects: Apply an animation effect to an element. Effects can also be used in hide or show.
server <- function(input, output) {
  observeEvent(input$show, {
    jqui_show('#gg', effect = input$effect)
  })
  
  observeEvent(input$hide, {
    jqui_hide('#gg', effect = input$effect)
  })
  
  output$gg <- renderPlot({
    ggplot(mtcars, aes(x = cyl, y = mpg, color = factor(gear))) +
      geom_point() +
      theme(plot.background = element_rect(fill = "transparent",colour = NA))
  }, bg = "transparent")
}

ui <- fluidPage(
  div(style = 'width: 400px; height: 400px',
      plotOutput('gg', width = '100%', height = '100%')),
  selectInput('effect', NULL, choices = get_jqui_effects()),
  actionButton('show', 'Show'),
  actionButton('hide', 'Hide')
)

shinyApp(ui, server)

  • Classes transformation: Add and remove class(es) to elements while animating all style changes.
server <- function(input, output) {

  current_class <- c()

  observe({
    input$class
    class_to_remove <- setdiff(current_class, input$class)
    class_to_add <- setdiff(input$class, current_class)
    current_class <<- input$class
    if(length(class_to_remove) > 0) {
      jqui_remove_class('#foo', paste(class_to_remove, collapse = ' '), duration = 1000)}
    if(length(class_to_add) > 0) {
      jqui_add_class('#foo', paste(class_to_add, collapse = ' '), duration = 1000)}
  })

}

ui <- fluidPage(

  tags$head(
    tags$style(
      HTML('.class1 { width: 410px; height: 100px; }
            .class2 { text-indent: 40px; letter-spacing: .2em; }
            .class3 { padding: 30px; margin: 10px; }
            .class4 { font-size: 1.1em; }')
    )
  ),

  div(id = 'foo', 'Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.'),
  hr(),
  checkboxGroupInput('class', 'Class',
                     choices = list(`width: 410px; height: 100px;` = 'class1',
                                    `text-indent: 40px; letter-spacing: .2em;` = 'class2',
                                    `padding: 30px; margin: 10px;` = 'class3',
                                    `font-size: 1.1em;` = 'class4'))


)

shinyApp(ui, server)

  • orderInput(): Display a list of items. Their order can be changed by drag and drop.
server <- function(input, output) {
  output$order <- renderPrint({ print(input$dest_order) })
}

ui <- fluidPage(
  orderInput('source', 'Source', items = month.abb,
             as_source = TRUE, connect = 'dest'),
  orderInput('dest', 'Dest', items = NULL, placeholder = 'Drag items here...'),
  verbatimTextOutput('order')
)

shinyApp(ui, server)

  • sortableTableOutput(): Render a HTML table with sortable rows.
ui <- fluidPage(
  verbatimTextOutput("index"),
  sortableTableOutput("tbl")
)

server <- function(input, output) {
  output$index <- renderPrint({
    cat("Row index:\n")
    input$tbl_row_index
  })
  output$tbl <- renderTable(head(mtcars), rownames = TRUE)
}

shinyApp(ui, server)

  • selectableTableOutput(): Render a HTML table with selectable rows or cells.
ui <- fluidPage(
  selectableTableOutput("tbl", selection_mode = "cell"),
  verbatimTextOutput("selected")
)

server <- function(input, output) {
  output$selected <- renderPrint({
    cat("Selected:\n")
    input$tbl_selected
  })
  output$tbl <- renderTable(head(mtcars), rownames = TRUE)
}

shinyApp(ui, server)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].