It is used to take a boolean value as input from the user. It is a button which toggles ON or OFF. We can create it by using <p:inputSwitch> component. It also provides various attributes that are tabled below.
Here, in the following example, we are implementing <p:inputSwitch> component. This example contains the following files.