
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bolttech/atoms-checkbox
Advanced tools
A simple React checkbox component.
Use the package manager npm or yarn to install the component.
npm install @bolttech/frontend-foundations @bolttech/atoms-checkbox
or
yarn add @bolttech/frontend-foundations @bolttech/atoms-checkbox
The Checkbox
component accepts the following properties:
Prop | Type | Description |
---|---|---|
id | string | The ID attribute for the checkbox element. |
label | string | The label text for the checkbox. |
disabled | boolean | Disables the checkbox when set to true . |
errorMessage | string | An optional error message to be displayed. |
ref | object | A reference object for the checkbox element. |
checked | boolean | Determines whether the checkbox is checked or not. |
onChange | function | Callback function to handle the checkbox change event. |
onBlur | function | Callback function to handle the checkbox blur event. |
onFocus | function | Callback function to handle the checkbox focus event. |
import React, {useState} from 'react';
import {Checkbox} from '@bolttech/atoms-checkbox';
import {bolttechTheme, BolttechThemeProvider} from "@bolttech/frontend-foundations";
const ExampleComponent = () => {
const [isChecked, setIsChecked] = useState(false);
const handleCheckboxChange = (event) => {
setIsChecked(event.target.checked);
};
return (
<BolttechThemeProvider theme={bolttechTheme}>
<Checkbox
id="custom-checkbox"
label="Check me"
disabled={false}
errorMessage="This field is required"
checked={isChecked}
onChange={handleCheckboxChange}
/>
</BolttechThemeProvider>
);
};
export default ExampleComponent;
Contributions are welcome! For any bug fixes, improvements, or new features, please open an issue or submit a pull request.
Please make sure to follow the code standards and test your changes before submitting.
FAQs
A simple React checkbox component.
The npm package @bolttech/atoms-checkbox receives a total of 274 weekly downloads. As such, @bolttech/atoms-checkbox popularity was classified as not popular.
We found that @bolttech/atoms-checkbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.