Hi, solid solution :) I see you are using 2 css classes to toggle visibility. That is a bit redundant and leaves room for bugs, because you have 4 possible states instead of 2 (hidden/flex/noHiddenNoFlex/hidden+flex)
messageHolder.classList.toggle('hidden');
messageHolder.classList.toggle('flex');
A better approach is to set your component to display: none; and add 1 toggle-class to set it to flex, e.g.:
messageHolder {
display: none;
&.active {
display: flex;
}
}
now just can just do only 1 toggle and your component is more stable because it now has only 2 states (display-none/display-flex)
messageHolder.classList.toggle('active');
And I saw in-code-styling in your code:
email.style.backgroundColor = "rgba(255, 98, 87, 0.17)";
It's better to avoid in-code-styling and do it the same way like you did with the toggle-class. In-code-styling can get in conflicts with css-files. So it's better to control the styling only via css-files/css-classes. Keep up the good work :)