
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
react-checkbox
Advanced tools
React Checkbox
A React checkbox with support for the indeterminate state.
$ npm i --save react-checkbox
var Checkbox = require('react-checkbox')
var checked = null
React.render(
<Checkbox checked={checked} supportIntermediate={true} />,
document.body
)
checked
: Boolean/Null - whether the checkbox should be checked or not. If supportIntermediate
is true, the checked
property can also have another value, which should equal to indeterminateValue
prop (which defaults to null)supportIndeterminate
: Boolean - whether the checkbox should support the indeterminate state. Defaults to false.indeterminateValue
- the value for checked
that should render the checkbox as indeterminate. Defaults to nullstopPropagation
: Boolean - whether to stop change
event propagation for the checkbox. Defaults to true.onChange
: Function(value, event) - The function to call when the state of the checkbox changes. NOTE: Unlike <input type="checkbox" />
, first param is the new value, and second param is the event object.defaultChecked
- uncontrolled version of checked
nextValue
: Function(oldValue, props) - can be used to change the default value order (when supportIndeterminate
is true
). Default order is: (checked -> unchecked; unchecked -> indeterminate; indeterminate -> checked
).If you want support for submitting the indeterminate value, and for specifying what to submit on each state, I suggest you take a look at react-check3
FAQs
React Checkbox
The npm package react-checkbox receives a total of 785 weekly downloads. As such, react-checkbox popularity was classified as not popular.
We found that react-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.