Icon Component #

The Icon Component renders a simple, inline Icon. You can choose from any of the available Icons.

An Icon Component can be created through the conventional method of using CastHub Web Components:

const $icon = window.casthub.create('icon', 'casthub');
this.$container.appendChild($icon);

If you need to change the type of Icon being displayed, you can just change the type attribute of the element:

const $icon = window.casthub.create('icon', 'casthub');
$icon.setAttribute('type', 'twitch');