Back




This example demonstrates setting a default value via the AvalynxSelect option defaultValue. When initialized, the component will select the matching option and reflect it in the button text.

Source of exampleCopy to clipboard

document.addEventListener('DOMContentLoaded', () => {
    new AvalynxSelect('#default-select', { defaultValue: '2' });
});
AvalynxSelect on GitHub Avalynx on GitHub