Back




This example demonstrates a disabled AvalynxSelect with and without a default value. The native select has the disabled attribute, which is mirrored to the custom button to prevent user interaction. Additionally, a default value is set via the defaultValue option, so "Option 2" is pre-selected when the component initializes.

Source of exampleCopy to clipboard

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