Blaze UI Toggles
Blaze UI is a CSS open-source framework. It is a lightweight UI toolkit and provides great tools for building customized and scalable applications. It can work with any framework that exists. It can adapt to any ecosystem. All designs or CSS are mobile-first and hence responsive. It project is available open-source so a large community maintains it.
Blaze UI Toggles can be used to check or uncheck, based on the condition, by toggling the button, which is styled with attractive and beautiful toggle buttons. Besides that, the toggles have many attributes and methods to control them programmatically. The toggles have different colors according to the use case.
Blaze UI Toggles Attributes:
- toggle: This attribute accepts the boolean values & depicts the initial state of the Toggle.
- type: This attribute is used to specify the color of the toggle.
Blaze UI Toggles Method:
- isToggled: This method returns the boolean value ie whether the toggle is checked or not.
Blaze UI Toggle Color Types:
- default: It can be depicted by the default grey color of the handle.
- brand: It can be depicted by the Blue-grey color of the handle.
- info: It can be depicted by the Blue color of the handle.
- warning: It can be depicted by the Yellow color of the handle.
- success: It can be depicted by the Green color of the handle.
- error: It can be depicted by the Red color of the handle.
Syntax: To create a Blaze UI toggle, use the following syntax:
<blaze-toggle toggled type="colorType">Content</blaze-toggle>
Example 1: This example illustrates the Blaze UI Toggles having different colors of toggles.
Example 2: In the following example, when we click on the button, we get an alert that the toggle on the page is toggled or not.