Toggle Button Data

<button class="c-button c-button__filled c-button__filled--default c-button--lg c-button__toggle" target="_top" data-toggle-label="Close" data-toggle-icon="close" aria-pressed="false" type="basic" aria-label="Click Me!" data-uid="673ed141eae1f">   
     <span class="c-button__label">         
                    <span class="c-button__label-icon ">
                    <!-- icon.blade.php -->
    <span class="c-icon c-icon--code c-icon--material c-icon--material-code material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-lg" aria-hidden="false" material-symbol="code" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed141eaf2e">
                    </span>
            </span>
        
                    <span class="c-button__label-text ">
                Click Me!
            </span>
        
    </span> </button>

Attributes

This script allows you to toggle the content of a button By adding one of these data attributes, when the button is pressed it will toggle the content of either attribute. You can choose to change either one or both. The attribute data-toggle-label will toggle between the original label and the string in the attribute. The attribute data-toggle-icon will change the icon between the original icon and the icon name in the attribute.

Blade component parameters

Attributes Description Values
data-toggle-label The label to toggle to string
data-toggle-icon The icon to toggle to string