Windframe Import update is finally here!


React Bootstrap 5 Switch

A React Bootstrap 5 switch is a simple component that allows a user to choose between two predefined alternatives. It can serves as a responsive switch, just like the on and off switch.

Importing the React Bootstrap 5 Switch Component

Import 'CDBSwitch' into your project to use the Contrast React Bootstrap 5 Switch component.

import { CDBSwitch } from 'cdbreact';


Change the initial setting of the switch to be on by using the 'checked' property.

Contrast React Bootstrap 5 Switch
import React from 'react';
import { CDBSwitch, CDBContainer } from 'cdbreact';
export const Switch = () => {
return (
<CDBSwitch />
<CDBSwitch checked />

API Reference: Contrast React Bootstrap 5 Switch Props

This section will expand on the props you'll be using with the Contrast React Bootstrap 5 Switch component. You'll learn what these props do, how to utilize them, and what their default values are.

Other CDBSwitch prop possibilities are included in the table below.`.

tagStringdivChanges default input tag<CDBSwitch tag="div" ... />
checkedBooleanfalseSets the initial state of switch to ON<CDBSwitch checked .../>

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


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