{"id":13515691,"url":"https://github.com/excid3/stimulus-slimselect","last_synced_at":"2025-10-04T04:32:06.301Z","repository":{"id":39343509,"uuid":"330488847","full_name":"excid3/stimulus-slimselect","owner":"excid3","description":"A Stimulus wrapper around SlimSelect","archived":false,"fork":false,"pushed_at":"2023-01-09T13:50:04.000Z","size":585,"stargazers_count":72,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-17T06:44:35.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/excid3/stimulus-slimselect","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/excid3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-17T21:18:51.000Z","updated_at":"2024-12-10T21:11:57.000Z","dependencies_parsed_at":"2023-02-08T12:01:40.166Z","dependency_job_id":null,"html_url":"https://github.com/excid3/stimulus-slimselect","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excid3%2Fstimulus-slimselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excid3%2Fstimulus-slimselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excid3%2Fstimulus-slimselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excid3%2Fstimulus-slimselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excid3","download_url":"https://codeload.github.com/excid3/stimulus-slimselect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235217925,"owners_count":18954520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:14.865Z","updated_at":"2025-10-04T04:32:00.999Z","avatar_url":"https://github.com/excid3.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/stimulus-slimselect.svg)](https://www.npmjs.com/package/stimulus-slimselect)\n\n# Stimulus SlimSelect\n\nThis is a Stimulus wrapper around the [SlimSelect](https://slimselectjs.com/) library.\n\n## Install\n\nThis assumes that [StimulusJS](https://stimulusjs.org) is already installed.\n\n```\nyarn add @hotwired/stimulus\n```\n\n**Optional**: Add the SlimSelect module if it is not already installed:\n\n```bash\n$ yarn add slim-select\n# OR\n$ npm install slim-select\n```\n\nAdd the `stimulus-slimselect` module:\n\n```bash\n$ yarn add stimulus-slimselect\nOR\n$ npm install stimulus-slimselect\n```\n\n## Basic Usage\n\nFirst, you'll want to initialize StimulusJS and then you can import the Stimulus component.\n\n```javascript\n// Start StimulusJS\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\n\nconst application = Application.start();\nconst context = require.context(\"controllers\", true, /.js$/);\napplication.load(definitionsFromContext(context));\n\n// Import and register the component\nimport StimulusSlimSelect from \"stimulus-slimselect\"\napplication.register('slimselect', StimulusSlimSelect)\n```\n\nThis will start StimulusJS and load any controllers that you have\nlocally and then register the Stimulus SlimSelect controller.\n\n## Values\n- Options: `Object`\n\nYou can add any options from [slim-select](https://github.com/brianvoe/slim-select/blob/master/src/docs/pages/options.vue)\ninto the component, simply do\n\n```html\n\u003cselect\n    data-controller=\"slimselect\"\n    data-slimselect-options-value=\"{slim-select options}\"\u003e\n\n\u003c/select\u003e\n```\n\n## Extending Components\n\nYou can use inheritance to extend the functionality of any Stimulus components.\n\n```js\nimport StimulusSlimSelect from \"stimulus-slimselect\"\n\nexport default class MySelect extends StimulusSlimSelect{\n  connect() {\n    super.connect();\n    console.log(\"hello world\")\n  }\n}\n```\n\nThese controllers will automatically have access to `targets` defined in the parent class.\n\nIf you override the `connect`, `disconnect` or any other methods from the parent, you'll want to call `super.method()` to make sure the parent functionality is executed.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at \u003chttps://github.com/excid3/stimulus-slimselect\u003e.  This project is intended to be a safe, welcoming space for  collaboration, and contributors are expected to adhere to the  Contributor Covenant code of conduct.\n\n## License\n\nThis package is available as open source under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcid3%2Fstimulus-slimselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcid3%2Fstimulus-slimselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcid3%2Fstimulus-slimselect/lists"}