🤩
Windframe Import Update is finally here.

Checkbox

React Bootstrap 5 Checkbox

React Bootstrap 5 Checkbox is a component that allows a user to select numerous options. It's widely used in forms and surveys.

The 'CDBInput' component or the 'CDBCheckbox' component, which comes with a specified style, can be used to create a checkbox in Contrast React Bootstrap 5 ( only available for pro users ).

Using the "CDBInput" component.

Import the 'CDBInput' component and update the value of the 'type' prop to 'checkbox' to use the default Contrast React Bootstrap 5 Checkbox component.

js
import React from "react";
import { CDBInput, CDBContainer } from "cdbreact";
const Checkbox = () => {
return (
<CDBContainer>
<CDBInput type="checkbox"/>
</CDBContainer>
);
};
export default Checkbox;

CDBCheckbox

Pro Component
js
import React from "react";
import { CDBCheckbox, CDBContainer } from "cdbreact";
const Checkbox = () => {
return (
<CDBContainer>
<CDBCheckbox/>
</CDBContainer>
);
};
export default Checkbox;

Disabled state

Pro Component

The 'disabled' property of the 'CDBCheckbox' component is set to false. To prevent the ability to click the checkbox, add the 'disabled' boolean property to 'CDBCheckbox.'

js
import React from "react";
import { CDBCheckbox, CDBContainer } from "cdbreact";
const Checkbox = () => {
return (
<CDBContainer>
<CDBCheckbox disabled/>
</CDBContainer>
);
};
export default Checkbox;

Contrast React Bootstrap 5 Checkbox Properties

This section will elaborate on the props available with the Contrast React Bootstrap 5 Checkbox component. You'll learn what these props do, how to utilize them, and what their default values are.

Other prop options for the 'CDBCheckbox' component are listed in the table below.

NameTypeDefaultDescriptionExample
classNameStringAdds custom classes<CDBCheckbox className="myClass" ... />
tagStringdivChanges default input tag<CDBCheckbox tag="input" ... />
disableBooleanfalseDisables Checkbox component<CDBCheckbox disabled .../>

Trying to build out all user interfaces and components for your website or web app from scratch can become a very tedious task. A huge reason why we created Contrast Bootstrap to help reduce the amount of time we spend doing that, so we can focus on building some other aspects of the project. Contrast Bootstrap PRO consists of a UI Kit featuring over 10000+ component variants. Together with a template of 5 admin dashboards and 23+ additional multipurpose pages template for building almost any type of website or web app. You can view a demo and learn more about Contrast by clicking here.Download the free react template

ad-banner

Contrast Bootstrap PRO was built using the most popular CSS framework Bootstrap to help build your next landing, admin SAAS, prelaunch etc project with a clean, prebuilt and well documented template and UI components.Learn more about Contrast