Coder Social home page Coder Social logo

particlesjs's Introduction

particlesjs

Particles background for 'Shiny' applications and 'RMarkdown' documents with particles.js

Travis build status Lifecycle: experimental

Installation

Install from GitHub with:

remotes::install_github("dreamRs/particlesjs")

Example

Use particles() in the console, Shiny UI or a R markdown chunk:

# default configuration:
particles()

# with a custom config
particles("pat/to/custom-config.json")

Create a custom config JSON here : https://vincentgarreau.com/particles.js/

particlesjs's People

Contributors

pvictor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

particlesjs's Issues

Particles in header

Thanks for the great package.

I want to add animation in the header of my dashboard. It works under body of the dashboard but not in header. I tried with tags$li(class='dropdown' in dashboardHeader( ) but it does not show the animation.

library(shiny)
library(particlesjs)


ui <- dashboardPage(
  
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    
    tags$li(class = "dropdown",
            tags$div(
              id="particles-target", 
              style = "position: absolute; height: 600px; width: 100%;"
            ),
            particles(target_id = "particles-target")
    ),
    
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),
      
      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)
  
  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Push to CRAN

Hi dreamRs,

Thanks for providing the R API for particlesJs. Is it possible to push it to CRAN so I can import this package to my pkg in a formal way?

Thanks

question

Hi!

Thanks for the implementation of a great feature!
Is it possible to hide/show (remove/insert div with particles) animation from shiny page depend on some reactive value?

Particles in modalDialog

Hi.
I am trying to use particles as background in a modalDialog but nothing shows. What can be wrong? Code is below.

Ivo

library(shiny)
library(shinyparticles)

server <- function(input,output) {            
    output$ui <- renderUI({
        showModal(modalDialog(
            div(id="particles-target", h1("Hello World"),
                style="height: 400px; width: 600px;"),
            size="l" 
        ))
    })

}

ui <- fluidPage(
    uiOutput('ui'),
    particles(target_id="particles-target")
)

shinyApp(ui, server)

miniUI doesn't recognize config.json

I'm trying to implement the particles on a miniUI gadget. When I point the particles() function to an existing config.json, it doesn't recognize it. Even particles_config() doesn't seem to work in miniUI.

Thank you again the amazing work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.