Search...

Checkbox

Contrast Angular Bootstrap Checkbox

Contrast Angular Bootstrap Checkbox is a component that allows users to make multiple selection from a list of options. It is broadly used in the forms and surveys.

Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.

Importing the Contrast Angular Bootstrap Checkbox Module

To use the Contrast Angular Bootstrap Card component in your project you need to import CheckboxModule.

ts
import {CheckboxModule } from 'cdbangular';

Default Checkbox

For the default Contrast Angular Bootstrap Checkbox, use the CDBInput component and pass in a type prop with its value set to checkbox

Angular Bootstrap Checkbox Default

HTML
html
<CDBInput type="checkbox"></CDBInput>

CDBCheckbox

Angular Bootstrap Checkbox

HTML
html
<CDBCheckbox class="mt-5"></CDBCheckbox>

Disabled state

Simply add the disabled Boolean attribute to CDBCheckbox

Angular Bootstrap Checkbox

HTML
html
<CDBCheckbox disabled="true"></CDBCheckbox>

API Reference: Contrast Checkbox Bootstrap Inputs

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Checkbox component. You will find out what these props do, their default values, and how you would use them in your code.

The table below lists other prop options of the CDBCheckbox component.

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
disableBooleanfalseDisables Checkbox componentdisabled=true

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically 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 Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.