Learn R Programming

reactCheckbox (version 1.0.0)

checkboxStyle: Checkbox style.

Description

Define CSS styles for a checkbox.

Usage

checkboxStyle(
  checked = NULL,
  checked_hover = NULL,
  unchecked = NULL,
  unchecked_hover = NULL,
  indeterminate = NULL,
  indeterminate_hover = NULL
)

Value

A named list, to be used in reactCheckboxesInput.

Arguments

checked

styles for the checkbox in checked state

checked_hover

styles for the checkbox in checked state on hover

unchecked

styles for the checkbox in unchecked state

unchecked_hover

styles for the checkbox in unchecked state on hover

indeterminate

styles for the checkbox in indeterminate state (for the head checkbox)

indeterminate_hover

styles for the checkbox in indeterminate state on hover

Examples

Run this code
library(htmltools) # provides the convenient function `css`
checkboxStyle(
  checked = css(
    background.color = "rgba(255, 82, 82, 0.87)",
    border.color = "black"
  ),
  checked_hover = css(
    background.color = "darkred",
    border.color = "darkred"
  )
)

Run the code above in your browser using DataLab