A series of web components that, when used together have many of the features of selectize.
These webcomponents follows the open-wc recommendation.
The project draws heavy inspiration from the jquery based selectize.js.
The need for this project is that we want to use selectize.js however we need the over all app to be built in Elm. Elm needs to "own" the DOM and selectize is built in a way that's not compatible with that.
The goal for this project to achieve near feature parity with selectize using web components. The API will be different so it will not be a drop in replacement but hopefully it will not be too hard to replace one with the other.
Browser support: TBD.
npm i much-selector<script type="module">
import 'much-selector/much-selector.js';
</script>
<much-selector>
<select>
<option value="IA">Iowa</option>
<option value="MN">Minnesota</option>
<option value="WI">Wisconsin</option>
</select>
</much-selector>To scan the project for linting errors, run
npm run lintYou can lint with ESLint and Prettier individually as well
npm run lint:eslintnpm run lint:prettierTo automatically fix many linting errors, run
npm run formatYou can format using ESLint and Prettier individually as well
npm run format:eslintnpm run format:prettierTo run the suite of karma tests, run
npm run testTo run the tests in watch mode (for TDD, for example), run
npm run test:watchTo run a local instance of Storybook for your component, run
npm run storybookTo build a production version of Storybook, run
npm run storybook:buildFor most of the tools, the configuration is in the package.json to reduce the amount of files in your project.
If you customize the configuration a lot, you can consider moving them to individual files.
npm startTo run a local development server that serves the basic demo located in demo/index.html
In theory, we could do this with a single web component, but this is going to be a large code base so breaking it up into smaller chunks should help different parts be more digestable.
Responsible for the "public" api.
Responsible for the input field where users will type.
Responsible for the creating the markup for the dropdown, positioning it, and stying it.
An individual option in the dropdown.