Description Usage Arguments Presets Examples
Customise the Hostess laoding bar.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | hostess_loader(
id = "hostess",
preset = NULL,
text_color = "#FFFFFF",
center_page = FALSE,
class = "",
min = 0,
max = 100,
svg = NULL,
progress_type = c("stroke", "fill"),
fill_direction = c("btt", "ttb", "ltr", "rtl"),
stroke_direction = c("normal", "reverse"),
fill_color = NULL,
stroke_color = NULL,
...
)
hostess_gradient(angle = 0, duration = 1, colors = c("red", "white", "blue"))
hostess_bubble(
color_background = "#697682",
color_bubble = "#f7fff7",
count = 25,
duration = 1
)
hostess_stripe(color1 = "#697682", color2 = "#f7fff7", duration = 1)
|
id |
Id of hostess (valid CSS). |
preset |
A loading bar preset, see section below. |
text_color |
The color of the loading text. |
center_page |
By default the hostess is not centered in the middle
of the screen, centering in the middle of the page is however ideal when using
it with waiter full screen, for the latter set to |
class |
CSS class. |
min, max |
Minimum and maximum representing the starting and ending points of the progress bar. |
svg |
Either an svg path e.g.: |
progress_type |
The progress type, either |
fill_direction, stroke_direction |
The direction which the progress bar should
take. Wether |
fill_color, stroke_color |
The color to use for the progress bar.
Wether |
... |
Any other other advanced options to pass to the loaded see the official documentation. |
angle |
Angle of gradient. |
duration |
Duration of the loop. |
colors |
Color vectors composing the gradient. |
color_background |
The background of the color. |
color_bubble |
The color of the bubbles contour. |
count |
The number of bubbles. |
color1, color2 |
Colors of stripes. |
line
fan
circle
bubble
rainbow
energy
stripe
text
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | library(shiny)
library(waiter)
# diagonal line
path <- "M10 10L90 30"
ui <- fluidPage(
useWaiter(),
useHostess(),
actionButton("draw", "redraw"),
plotOutput("plot")
)
server <- function(input, output) {
dataset <- reactive({
input$draw
hostess <- Hostess$new(min = 0, max = 10)
hostess$set_loader <- hostess_loader(
progress_type = "stroke",
stroke_color = hostess_stripe()
)
waiter <- Waiter$new(
"plot",
hostess$loader()
)
waiter$show()
for(i in 1:10){
Sys.sleep(.2)
hostess$inc(1)
}
runif(100)
})
output$plot <- renderPlot(plot(dataset()))
}
if(interactive()) shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.