Giter Site home page Giter Site logo

lucymcgowan / shinyswipr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nstrayer/shinyswipr

1.0 2.0 0.0 36 KB

An R Shiny module to put swiping interfaces in your app!

Home Page: http://livefreeordichotomize.com/2017/03/12/introducing-shinyswipr-swipe-your-way-to-a-great-shiny-ui/

R 1.35% CSS 2.57% JavaScript 96.08%

shinyswipr's Introduction

#shinyswipr

A simple Shiny module for putting swipe based interfaces into shiny apps. Ever felt like Shiny wasn't "tinder-y" enough? Well here you go.


Installation

This package is currently not on CRAN so the only way to install it is using github.

devtools::install_github("nstrayer/shinyswipr")

Usage

Two functions are exported by this package: shinySwiprUI and shinySwipr. These two must be used in conjunction with each other in both the ui and server of your shiny app respectively.

shinySwiprUI allows you to pass any other UI elements to it, it will then wrap those UI elements in a card interface that can be swiped.

A simple app that displays a card and prints to the R console your swipe result would go as follows.

library(shinyswipr)
ui <- fixedPage(
  shinySwiprUI( "my_swiper",
                h4("Swipe Me!"),
                hr(),
                p("This is some content that would warrent a good swipe")
  )
)

server <- function(input, output, session) {
  card_swipe <- callModule(shinySwipr, "my_swiper")

  observeEvent( card_swipe(),{
    print(card_swipe) #show last swipe result. 
  }) 
}

shinyswipr's People

Stargazers

 avatar

Watchers

 avatar  avatar

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.