Title: | A Wrapper of JavaScript Library 'flipdown.js' |
---|---|
Description: | Include a countdown <https://github.com/PButcher/flipdown> in all R contexts with the convenience of 'htmlwidgets'. |
Authors: | Yongchao Fang [aut, cre], Peter Butcher [ctb, cph] (author of flipdown.js) |
Maintainer: | Yongchao Fang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-01-19 04:15:11 UTC |
Source: | https://github.com/fanggong/flipdownwidgets |
This function creates an HTML widgets to display a countdown using the flipdown.js library.
flipdownWidgets( to, ..., theme = c("dark", "light"), headings = c("Days", "Hours", "Minutes", "Seconds"), width = NULL, height = NULL, elementId = NULL )
flipdownWidgets( to, ..., theme = c("dark", "light"), headings = c("Days", "Hours", "Minutes", "Seconds"), width = NULL, height = NULL, elementId = NULL )
to |
R object to be passed to the as.POSIXct function to specifying the target date. |
... |
all the argument to be passed to as.POSIXct. |
theme |
The theme of the widget. Possible value: "dark", "light". |
headings |
A character vector of length 4 specifying the heading related to each time part. Defaults to c("Days", "Hours", "Minutes", "Seconds"). |
width |
Width of the countdown widget. Must be a valid CSS unit (like |
height |
Not being used here. The height of the widget will be automatically sized according to the width of the widget. |
elementId |
An id for the widget (a random string by default). |
An HTML countdown widget
library(flipdownWidgets) flipdownWidgets(Sys.time() + 100)
library(flipdownWidgets) flipdownWidgets(Sys.time() + 100)
Output and render functions for using flipdownWidgets within Shiny applications and interactive Rmd documents.
flipdownWidgetsOutput(outputId, width = "100%", height = "400px") renderFlipdownWidgets(expr, env = parent.frame(), quoted = FALSE)
flipdownWidgetsOutput(outputId, width = "100%", height = "400px") renderFlipdownWidgets(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a flipdownWidgets |
env |
The environment in which to evaluate |
quoted |
Is |
flipdownWidgetsOutput
returns a flipdownWidgets output element that can be included in user interface.
And renderFlipdownWidgets
returns a function which will generate data for render.