Creating a multi-select, drop down

I’m looking to create a multi-select drop down element in the same vein as select2
So far using their npm has proved unsuccessful so I wanted to know if it was possible to create a totally custom one.

The element must show a list of elements drop down based on what the user types, and a list of selected elements in or below it with a delete button. These elements will then be used for further calculations.

Any help will be appreciated.

The Checkbox Dropdown example is a good example of a multi-select dropdown.