Slider

Description

A range input component styled as a slider.

Usage

bc_slider(
  min,
  max,
  value,
  ...,
  disabled = FALSE,
  id = NULL,
  label = NULL,
  description = NULL,
  oninput = NULL,
  aria_label = NULL
)

Arguments

Argument Description
min Number. The minimum value of the slider.
max Number. The maximum value of the slider.
value Number. The current value of the slider.
... Additional attributes passed to the <input>.
disabled Bool. Whether the slider is disabled.
id String. The input id, and the for of its label.
label String or tag. Optional label for the slider.
description String or tag. Helper text shown under the label, wired to the input with aria-describedby.
oninput String. JavaScript function to run when the input changes.
aria_label String. Accessible name, for a slider with no visible label.

Value

A tag with an <input type="range"> element.

Examples

bc_slider(0, 100, 50, aria_label = "Volume")

bc_slider(
  min = 0,
  max = 100,
  value = 50,
  label = "Temperature",
  description = "Adjust the temperature setting"
)

Adjust the temperature setting