empty_state_component | R Documentation |
Function to create a custom empty state component.
empty_state_component(content, title, subtitle = NULL)
content |
An HTML tag object used to render and provide the main content for the empty state. |
title |
A character string representing the main text that describes the empty state content. |
subtitle |
A character string providing supporting
details about the empty state. Defaults to |
content
works best with fontawesome::fa()
and bsicons::bs_icon()
.
shiny::icon()
will also work, but this will require loading the
html dependencies in the ui, i.e. calling fontawesome::fa_html_dependency()
to use icons from FontAwesome.Glyphicon does not need any html dependency.
a shiny.tag
library(shiny.emptystate)
if (interactive()) {
empty_state_component(
fontawesome::fa(name = "clipboard-question", height = "10rem"),
title = "Content is not available",
subtitle = "Please provide valid inputs to generate content."
)
empty_state_component(
bsicons::bs_icon(
name = "question-square",
size = "15rem"
),
title = "Content is not available",
subtitle = "Please provide valid inputs to generate content."
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.