Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@trendmicro/react-checkbox
Advanced tools
React Checkbox
Demo: https://trendmicro-frontend.github.io/react-checkbox
npm install --save react @trendmicro/react-checkbox
@trendmicro/react-checkbox
and its styles in your application as follows:import Checkbox from '@trendmicro/react-checkbox';
// Be sure to include styles at some point, probably during your bootstraping
import '@trendmicro/react-checkbox/dist/react-checkbox.css';
<Checkbox label="Checkbox label" />
The label prop is optional, you can use children to pass through the component.
<Checkbox label="Checkbox label">
<p style={{ marginLeft: 24 }}>
Lorem ipsum dolor sit amet...
</p>
</Checkbox>
<Checkbox>
<span style={{ verticalAlign: 'middle', marginLeft: 8 }}>
Lorem ipsum dolor sit amet...
</span>
</Checkbox>
// Default checked
<Checkbox defaultChecked />
// Default partially checked
<Checkbox defaultChecked defaultIndeterminate />
// Checked
<Checkbox checked />
// Partially checked
<Checkbox checked indeterminate />
Name | Type | Default | Description |
---|---|---|---|
children | any | Children to pass through the component. | |
className | Object | Customized class name for the component. | |
style | Object | Customized style for the component. | |
label | Node or String | Text label to attach next to the checkbox element. | |
inputClassName | Object | Customized class name for the checkbox element. | |
inputStyle | Object | Customized style for the checkbox element. | |
disabled | Boolean | false | If true, the checkbox shown as disabled and cannot be modified. |
checked | Boolean | The checked state of the checkbox element. | |
defaultChecked | Boolean | The default checked state of the checkbox element. | |
indeterminate | Boolean | The indeterminate state of the checkbox element. | |
defaultIndeterminate | Boolean | false | The default indeterminate state of the checkbox element. |
Use the ref property to get a reference to the component:
<Checkbox
ref={node => {
if (node) {
this.checkbox = node;
console.log(this.checkbox.checked);
console.log(this.checkbox.indeterminate);
}
}}
/>
Name | Type | Description |
---|---|---|
checked | Boolean | Get the checked state. |
indeterminate | Boolean | Get the indeterminate state. |
MIT
FAQs
React Checkbox component
We found that @trendmicro/react-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.