{"id":25059930,"url":"https://github.com/stla/swiper","last_synced_at":"2025-04-14T14:24:38.924Z","repository":{"id":64663116,"uuid":"575824594","full_name":"stla/swipeR","owner":"stla","description":"Carousels in R.","archived":false,"fork":false,"pushed_at":"2023-10-11T07:36:19.000Z","size":18409,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T20:49:44.005Z","etag":null,"topics":["carousel","htmlwidgets","r","shiny","swiper"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-08T11:36:19.000Z","updated_at":"2024-01-10T12:51:22.000Z","dependencies_parsed_at":"2022-12-13T21:15:39.796Z","dependency_job_id":"ae72e529-b5c3-47d2-9218-a17a84531d85","html_url":"https://github.com/stla/swipeR","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"0908b588c908f5ee6a477f05326279bee7463423"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stla%2FswipeR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stla%2FswipeR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stla%2FswipeR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stla%2FswipeR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stla","download_url":"https://codeload.github.com/stla/swipeR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248895524,"owners_count":21179251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carousel","htmlwidgets","r","shiny","swiper"],"created_at":"2025-02-06T15:55:47.910Z","updated_at":"2025-04-14T14:24:38.876Z","avatar_url":"https://github.com/stla.png","language":"R","readme":"# swipeR\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/stla/swipeR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/stla/swipeR/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n___\n\n![](https://raw.githubusercontent.com/stla/swipeR/main/inst/gifs/swipeR-images.gif)\n\n![](https://raw.githubusercontent.com/stla/swipeR/main/inst/gifs/swipeR-shiny.gif)\n\n![](https://raw.githubusercontent.com/stla/swipeR/main/inst/gifs/swipeR-shiny2.gif)\n\nI finally found a way to make the Shiny slider work in the carousel. One has \nto include it in a `div` with the class `swiper-no-swiping`:\n\n```r\n        tags$div(\n          class = \"swiper-no-swiping\",\n          sliderInput(\n            inputId = \"slider\", label = \"Base font size:\",\n            value = 12, min = 10, max = 20\n          )\n        )\n```\n\n- To include an image in a carousel from a file, you can use **base64** encoding:\n\n    ```{r}\n    library(swipeR)\n    library(htmltools)\n    library(base64enc)\n    b64 \u003c- dataURI(file = \"path_to_image.png\", mime = \"image/png\")\n    wrapper \u003c- swipeRwrapper(\n      tags$img(src = b64, style = \"width: 500px; margin: auto;\"),\n      ......\n    )\n    swipeR(wrapper, height = \"400px\", navigationColor = \"navy\")\n    ```\n\n- To include **plotly** graphics in a carousel in R Markdown, you can do:\n\n    ```{r}\n    library(swipeR)\n    library(htmltools)\n    library(plotly)\n    g1 \u003c- ggplot(mtcars, aes(disp, wt)) + geom_point() + ggtitle(\"Plot 1\")\n    g2 \u003c- ggplot(mtcars, aes(drat, wt)) + geom_point() + ggtitle(\"Plot 2\")\n    g3 \u003c- ggplot(mtcars, aes(qsec, wt)) + geom_point() + ggtitle(\"Plot 3\")\n    wrapper \u003c- swipeRwrapper(\n      tags$div(style = \"width: 500px; margin: auto;\", ggplotly(g1)),\n      tags$div(style = \"width: 500px; margin: auto;\", ggplotly(g2)),\n      tags$div(style = \"width: 500px; margin: auto;\", ggplotly(g3))\n    )\n    swipeR(wrapper, height = \"400px\", navigationColor = \"navy\")\n    ```\n\n- The package also provides a RStudio addin:\n\n![](https://raw.githubusercontent.com/stla/swipeR/main/inst/gifs/swipeRaddin.gif)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstla%2Fswiper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstla%2Fswiper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstla%2Fswiper/lists"}