# Change header's custom style

* Create a button element using HTML. Paste the following code on the HTML code editor tab:

```html
<button id="color">Click here to change header styling</button>
```

* Add the logic to change the header's style upon clicking the button:

```javascript
const button = document.querySelector("#color");
button.addEventListener("click", () => {
    const event = new CustomEvent("widget_changeHeaderColor", {
        detail:{
            "backgroundColor": "#00bcd4",
            "borderRadius": 7,
            "color": "#ffffff",
            "boxShadow": "3px 3px 5px 6px #cccccc",
            "fontWeight": "bold"
        }
    });
    document.dispatchEvent(event);
});
```

Save the widget's settings by clicking on the green check mark. The result is shown below:

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FLgXZoaWgmfTbV99CORHm%2Fimage.png?alt=media&#x26;token=539af644-304c-4bad-93f1-9a86d9fae8fe" alt=""><figcaption></figcaption></figure>
