| bones_skeleton | R Documentation |
Makes the grey placeholder on its own, with no output in it. You do not
need this for a Shiny output, because withBones() makes the
placeholder for you. Use this function where there is no Shiny output:
for example, inside a renderUI() while you get data, or to look at a
shape while you design a page.
bones_skeleton(
type = "text",
rows = 6L,
cols = 4L,
lines = 3L,
n = 3L,
height = NULL
)
type |
The shape: |
rows |
The number of body rows, for |
cols |
The number of columns, for |
lines |
The number of lines, for |
n |
The number of cards or values, for |
height |
A CSS height for the placeholder, or a number of pixels.
|
The skeleton uses the animation and the colours from bones_defaults().
An htmltools::tag, with the stylesheet attached.
A chart has a shape for each common kind: "bar", "line",
"scatter", "area", "histogram", "pie", "heatmap", "map",
"network", "timeline" and "wordcloud". "plot" is the same as
"bar". withBones() finds the shape of a map, network, timeline or
word cloud widget from its output. plotOutput() cannot say which kind it will
hold, because renderPlot() decides that later, on the server. So you
name the kind yourself.
A table from a table package has a shape that copies that package:
"dt", "reactable", "gt" and "rhandsontable". withBones() finds
it from the output by itself.
bones_skeleton("text", lines = 4)
bones_skeleton("table", rows = 8, cols = 5)
bones_skeleton("plot", height = "300px")
bones_skeleton("scatter", height = "300px")
bones_skeleton("dt", rows = 10, cols = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.