empty_state_component {shiny.emptystate} | R Documentation |
Create an empty state component
Description
Function to create a custom empty state component.
Usage
empty_state_component(content, title, subtitle = NULL)
Arguments
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 |
Details
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.
Value
a shiny.tag
Examples
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."
)
}
[Package shiny.emptystate version 0.1.0 Index]