Custom dropdown/select with css and javascript

preview_player
Показать описание
A quick walkthrough on how to create a custom dropdown with css and javascript.

source code:

follow @:

Рекомендации по теме
Комментарии
Автор

Wow, not missing anything with this. Thanks for the tutorial!

karlkrasnowsky
Автор

Amazing tutorial 😊. Really liked the part about closing the dropdown once element looses focus.

romanext
Автор

Your video is perfect. The only thing that I think needs an improvement is your thumbnail. For some viewers, they rely on thumbnails first. Clicking is the first step to watch. But overall, this is the best tutorial i've seen. It covers one of the web vitals requirements.

ericechemane
Автор

good point on accessibility, thank you !

TheBorninmotion
Автор

This is amazing. Thanks for this tutorial. I'll test if it works with more than one custom select field on the page.

Jonhyleo
Автор

This is fantastic. Fast moving but fantastic. Really makes me appreciate declarative programming though. You mean I have to change the state AND tell change the GUI to match?? lol tedious!

MobiusCoin
Автор

Amazing tutorial, I have watched at least 5 videos on How to Build Custom Select Dropdown but none of them cover the accessibility issue. Congrats. Just one question, why after expand you are not focusing on the currently selected element, and instead you are focusing on the first element? How can I achieve that based on your codepen version?

floriancucu
Автор

Hello may I ask you to do the JS part with a class not a function because I can't work it out

BgTheoBs
Автор

Thank you for this. I am very new at this, i am struggling with the java script section. I cannot understand the way you do it.

sbonelodube
Автор

Great tutorial, thnx. Is het possible to make this work in a form ?, i mean can the value be a input value for a POST?

Brinskynl
Автор

not a proper dropdown: how about a click outside event ?

NotTheLastOne
join shbcf.ru