Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/etiennebacher/prompter
Add tooltips in Shiny apps with hint.css
https://github.com/etiennebacher/prompter
Last synced: 12 days ago
JSON representation
Add tooltips in Shiny apps with hint.css
- Host: GitHub
- URL: https://github.com/etiennebacher/prompter
- Owner: etiennebacher
- License: other
- Created: 2020-12-16T19:19:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T17:40:30.000Z (7 months ago)
- Last Synced: 2024-10-11T18:19:08.413Z (28 days ago)
- Language: R
- Homepage: https://prompter.etiennebacher.com/
- Size: 640 KB
- Stars: 41
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-shiny-extensions - prompter - Add tooltips in Shiny apps with 'hint.css'. (UI Components / Walkthrough / Tooltip / Help)
- jimsghstars - etiennebacher/prompter - Add tooltips in Shiny apps with hint.css (R)
README
prompter
[![Codecov.io test coverage](https://app.codecov.io/gh/etiennebacher/prompter/branch/master/graphs/badge.svg)](https://app.codecov.io/github/etiennebacher/prompter)
[![R build status](https://github.com/etiennebacher/prompter/workflows/R-CMD-check/badge.svg)](https://github.com/etiennebacher/prompter/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/prompter)](https://CRAN.R-project.org/package=prompter)
[![Website](https://img.shields.io/badge/Website-Visit-blue)](https://prompter.etiennebacher.com/#/)
The goal of `{prompter}` is to easily create tooltips on many HTML elements in Shiny apps. This is the adaptation of [`hint.css`](https://github.com/chinchang/hint.css) in R.## Installation
You can install the CRAN version:
``` r
install.packages("prompter")
```Or install the development version:
``` r
# install.packages("devtools")
devtools::install_github("etiennebacher/prompter")
```## Demo
``` r
library(prompter)
library(shiny)
library(ggplot2)
library(magrittr)ui <- fluidPage(
# Load the dependencies
use_prompt(),
column(
3,
# Put the element inside add_prompt()...
add_prompt(
actionButton("plot", "click"),
position = "bottom", message = "this is a button"
)
),
column(
9,
# ... or use magrittr's pipe
plotOutput("plot") %>%
add_prompt(
message = "this is a plot, and I add some text to show the size of the box.",
position = "left", type = "error",
size = "medium", rounded = TRUE
)
)
)server <- function(input, output, session) {
output$plot <- renderPlot(ggplot(mtcars, aes(wt, mpg))+ geom_point())
}shinyApp(ui, server)
```
Here's the output of this code:![](demo2.gif)
## Code of Conduct
Please note that the prompter project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
## Acknowledgements
Kushagra Gour for the original [`hint.css`](https://github.com/chinchang/hint.css) library.