Skip to content
Related Articles

Related Articles

Blaze UI Toggles Methods

Improve Article
Save Article
  • Last Updated : 21 Apr, 2022
Improve Article
Save Article

Blaze UI is a free open source UI Toolkit that provides a great structure for building websites quickly with a scalable and maintainable foundation. All components in Blaze UI are developed mobile-first and rely solely on native browser features, not a separate library or framework. It helps us to create a scalable and responsive website fast and efficiently with a consistent style.

In this article, we will be seeing the Blaze UI Toggle methods. The isToggled() method returns a Promise which resolves into a boolean value that refers to the current state of the toggle component, returns “true” if the toggle is on, and returns “false” otherwise.



Example 1: This example represents how to use the isToggled() method to get the current state of the toggle component.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content=
              "width=device-width, initial-scale=1.0">
    <title>Blaze UI - Toggle Methods</title>
    <link rel="stylesheet" href=
    <script type="module" src=
    <script nomodule="" src=
        body {
            font-family: sans-serif;
            text-align: center;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin-top: 20px;
    <div class="u-centered">
        <h2 style="color:green;">GeeksforGeeks</h2>
        <h3>Toggle Methods - Blaze UI</h3>
    <div class="wrapper u-window-box-super">
        <blaze-toggle id="toggle1" toggled>
           Toggle Me
            <button class="c-button" onclick="getToggleValue()">
                Check isToggled 
        <p>The returned value of isToggled method is: <b>
         <span id="result"></span></b></p>
        function getToggleValue(){
            .isToggled().then(function (result) {
                      .innerText = result;




My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!