defaultValue
.
When initialized, the component will select the matching option and reflect it in the button text.
document.addEventListener('DOMContentLoaded', () => {
new AvalynxSelect('#default-select', { defaultValue: '2' });
});
AvalynxSelect on GitHub
Avalynx on GitHub