This book is the result of three years of spare time work and passion about the open source R Shiny world. It is under final development and intended for a 2022 Q2 release in the R Series by Chapman & Hall. The author warmly thanks CRC Press for allowing this online version to remain free and accessible to everyone.
If you fulfill the above prerequisites, you should read this book if you have already asked one of the following questions:
- How to develop Shiny apps with a more professional look and feel?
- How to design new input widgets to unleash interactivity?
- How to better handle JS and CSS in Shiny apps?
- How to develop a mobile-friendly template for Shiny?
- How to include React in Shiny apps?
This book will help you to:
- Understand how Shiny deals with the classic web development standards and what are the main differences.
- Manipulate HTML tags from R to create custom layouts.
- Discover the steps to import and convert existing web frameworks like Bootstrap 4 and Framework7.
- Learn how Shiny internally deals with inputs.
- Learn more about less-documented Shiny mechanisms (websockets, sessions, …).
This book is organized into seven parts:
Part 2 focuses on cascading stylesheets (CSS) and Sass (Syntactically Awesome Style Sheets). We provide the reader with basic CSS knowledge to get the most out of Sass, a powerful tool to seamlessly alter Shiny apps’s style in a more reproducible manner. All along this part, we showcase examples from the R community like fresh (Perrier and Meyer 2020b) and bslib (Sievert and Cheng 2021), to significantly beautify apps with only few lines of code.
renderUIpatterns that may speed up Shiny apps. This part contains many hidden gems to significantly and quickly enhance apps.
Part 4 focuses on the development of a new template for Shiny by demonstrating examples from the tablerDash (Granjon 2021e) package. These, and more, may be explored further as part of the RinteRface project. This case study mobilizes all knowledge acquired in the previous parts.
Part 6 dives into mobile web development through a practical study involving a rework of shinyMobile (Granjon, Perrier, and Rudolf 2021). We give a brief introduction to the progressive web application world with some patterns to get started like service workers, web manifests, offline pages.
By the end of that book, the reader should be able to entirely customize any Shiny app in a reasonable amount of time.
This book has a side package containing all the necessary material to run the code without having to reload each previous snippet.
The RinteRface project is an initiative aiming to provide one of the most famous HTML templates to Shiny. Everything started with the collaboration of John Coene and David Granjon in early 2018 on shinybulma (John Coene and Granjon 2021) to the official release of RinteRface in November 2018 with shinydashboardPlus (Granjon 2021d), bs4Dash (Granjon 2021a) as line-up packages.
RinteRface work has been awarded several times at the two latest Shiny contests (2019 and 2020), through contributions like:
- A virtual lab for teaching physiology (2019), the Apps.Physiol platform, fueled by bs4Dash and hosted in
RinteRface is very grateful to the R community, and this book is a sort of acknowledgment.
- I’d like to warmly thank all CRC reviewers: Emily Riederer, Barret Schloerke and Eric Nantz for their valuable comments and help.
- My eternal gratitude to Barret Schloerke for spending hours to get Github Actions working and deploying all app examples in this book (>= 100).
- Howard Baek for testing almost all chapters. Howard was the perfect book target with good knowledge in Shiny and beginner level in web development.
- Many thanks to Hadley Wickham for his general thoughts about the book organization. This was really helpful to reorder the content.
- I am very grateful to Douglas Robinson for proof reading the first book manuscript and fixing many typos it contained.
- A special thanks to my friends John and Victor for contributing to RinteRface.
- Thanks to the ThinkR team: Diane, Margot, Cervan, Colin, Sébastien and Vincent for providing material support during most of the RinteRface workshops.
- RinteRface and this book won’t exist without the amazing R community. Thanks for their valuable feedback.
- The front cover was designed using the amazing undraw open source illustration library. Many thanks to Katerina Limpitsouni for making this possible.
This book was written with bookdown (Xie 2021a) in the RStudio desktop and VSCode IDEs. The website is hosted by RinteRface, and all apps are automatically deployed at each commit by a specific Github Actions workflow. This book was built with R version 4.0.2 Patched (2020-08-27 r79088) and the following packages:
|apexcharter||0.1.8||CRAN (R 4.0.2)|
|blogdown||1.1||CRAN (R 4.0.2)|
|bs4Dash||2.0.3||CRAN (R 4.0.2)|
|bslib||0.3.0||CRAN (R 4.0.2)|
|CaPO4Sim||0.2.0||CRAN (R 4.0.2)|
|deSolve||1.29||CRAN (R 4.0.2)|
|dplyr||1.0.3||CRAN (R 4.0.2)|
|fresh||0.2.0||CRAN (R 4.0.2)|
|ggplot2||3.3.3||CRAN (R 4.0.2)|
|golem||0.3.1||CRAN (R 4.0.2)|
|htmltools||0.5.2||CRAN (R 4.0.2)|
|httpuv||1.6.3||CRAN (R 4.0.2)|
|httr||1.4.2||CRAN (R 4.0.2)|
|jsonlite||1.7.2||CRAN (R 4.0.2)|
|magrittr||2.0.1||CRAN (R 4.0.2)|
|purrr||0.3.4||CRAN (R 4.0.2)|
|reactR||0.4.4||CRAN (R 4.0.2)|
|sass||0.4.0||CRAN (R 4.0.2)|
|scales||1.1.1||CRAN (R 4.0.2)|
|shiny||1.6.0||CRAN (R 4.0.2)|
|shiny.react||0.2.3||CRAN (R 4.0.2)|
|shiny.router||0.2.2||CRAN (R 4.0.2)|
|shinydashboard||0.7.1||CRAN (R 4.0.2)|
|shinydashboardPlus||2.0.3||CRAN (R 4.0.2)|
|shinyjs||2.0.0||CRAN (R 4.0.2)|
|shinylogs||0.1.7||CRAN (R 4.0.2)|
|shinyMobile||0.9.1||CRAN (R 4.0.2)|
|shinyWidgets||0.5.7||CRAN (R 4.0.2)|
|testthat||3.0.2||CRAN (R 4.0.2)|
|thematic||0.1.2||CRAN (R 4.0.2)|
|waiter||0.2.3||CRAN (R 4.0.2)|
|websocket||1.3.1||CRAN (R 4.0.2)|