Skip to contents

An animated loading spinner.

Usage

shad_spinner(
  size = c("default", "sm", "lg"),
  muted = FALSE,
  label = "Loading",
  class = NULL,
  ...
)

Arguments

size

"default", "sm" or "lg".

muted

If TRUE, uses the muted colour.

label

Accessible label.

class

Extra CSS classes.

...

Extra attributes.

Value

An inline <svg class="shad-spinner">.

Examples

shad_spinner()
#> <svg class="shad-spinner" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="status" aria-label="Loading"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>
shad_spinner(size = "lg", muted = TRUE)
#> <svg class="shad-spinner shad-spinner--lg shad-spinner--muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="status" aria-label="Loading"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>