Search...

Switch

Contrast Angular Bootstrap Switch

Contrast Angular Bootstrap switch is a simple component that a user uses to toggle between two predefined options.

Importing the Contrast Angular Bootstrap Switch Module

To use the Contrast Angular Bootstrap Switch component in your project you need to import SwitchModule.

ts
import {SwitchModule } from 'cdbangular';

Default Switch

Angular Bootstrap Switch Default

HTML
html
<CDBSwitch></CDBSwitch>
<CDBSwitch [checked]=true></CDBSwitch>

API Reference: Contrast Angular Bootstrap Switch Props

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Switch 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 CDBSwitch.

NameTypeDefaultDescriptionExample
checkedBooleanfalseSets the initial state of switch to ON[checked]=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.