
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@ewc-lib/ewc-multiselect
Advanced tools
A multi-select component built with LitElement and TailwindCSS based on ECL styles.
A customizable multi-select component built with LitElement and TailwindCSS. This component allows users to select multiple countries, mark favorites, and reset selections.
To install the component, use NPM:
npm install @ewc-lib/ewc-multiselect
Import the component in your project and use it in your HTML:
import '@ewc-lib/ewc-multiselect';
See the main.js file in the site/src folder.
<my-multiselect
enableFavorite="true"
countries='[
[{"code": "EU27_2020", "name": "European Union", "status": "active"}],
[
{"code": "AT", "name": "Austria", "status": "active"},
{"code": "BE", "name": "Belgium", "status": "active"},
...
],
[
{"code": "NO", "name": "Norway", "status": "active"},
{"code": "CH", "name": "Switzerland", "status": "active"},
...
]
]'
defaultCountries='["EU27_2020"]'
maxSelectableCountries="5"
resetButtonThreshold="3"
invertColors="false"
dropdownHeight="200px"
></my-multiselect>
enableFavorite: Set to "true" to enable favorite functionality.countries: JSON array of country groups. Each country object should have a code, name, and status.defaultCountries: Array of default country codes.maxSelectableCountries: Maximum number of selectable countries.resetButtonThreshold: Number of selections before the reset button appears.invertColors: Use this when embedding the component on a dark background.dropdownHeight: Use this, when you want to control the height of the dropdown. Provide number with 'px'.The component dispatches custom events for interactions:
country-selected: Fired when a country is selected.country-deselected: Fired when a country is deselected.favorite-change: Fired when the favorite country changes.reset: Fired when selections are reset.multiSelect.addEventListener("country-selected", (event) => {
console.log("Country selected:", event.detail.country);
});
multiSelect.addEventListener("country-deselected", (event) => {
console.log("Country deselected:", event.detail.country);
});
multiSelect.addEventListener("reset", (event) => {
console.log("Selection reset:", event.detail.selectedCountries);
});
multiSelect.addEventListener("favorite-change", (event) => {
console.log("Favorite country changed:", event.detail.favoriteCountry);
});
Compile the TypeScript code to JavaScript and watch for changes.
npm run watch
cd site
npm run dev
Now, code changes are directly reflected in the browser.
Before publishing, test the package locally:
npm pack to create a tarball.npm install ../path-to-your-package/@ewc-lib/ewc-multiselect-x.y.z.tgz.This project is licensed under the EUPL License.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
FAQs
A multi-select component built with LitElement and TailwindCSS based on ECL styles.
We found that @ewc-lib/ewc-multiselect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.