How to create a selectable list in Materialize CSS

Viewed 129

I want to create a select that looks like a collection in Materialize CSS. I know that in order to do something like that on plain HTML I need to use the size attribute.

<select id="someSelect" size="8">
    <option value="3">Blabla</option>
    <option value="4">Bla</option>
    ...
</select>

Howhever, when I add it, it doesn't change anything, and the select is still a dropdown and not a list.

How could I create a selectable list (only one selection at a time) in Materialize CSS?

EDIT: bahman parsamanesh mentioned in his comment the usage of <div class="collection"> and <a> inside it, which is exactly I was looking for, but how could I handle it's onChange?

0 Answers
Related