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="66057fd37bb6e">   
     <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-outlined material-symbols-outlined--filled c-icon--size-lg" aria-hidden="true" material-symbol="code" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" data-uid="66057fd37bc00">
                code
    </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