{"id":32237232,"url":"https://github.com/wesx8/selecto","last_synced_at":"2026-02-22T11:33:20.075Z","repository":{"id":58232433,"uuid":"133826057","full_name":"wesx8/selecto","owner":"wesx8","description":"html select replacement written in vanillaJS","archived":false,"fork":false,"pushed_at":"2018-05-18T16:03:37.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T13:44:18.570Z","etag":null,"topics":["dropdown","dropdown-menus","easy-to-use","javascript","js","lightweight","select-image","selecto","swift","vanilla-javascript","vanilla-js"],"latest_commit_sha":null,"homepage":"https://westag.github.io/selecto/","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/wesx8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-17T14:34:14.000Z","updated_at":"2025-09-19T08:47:36.000Z","dependencies_parsed_at":"2022-08-30T22:30:24.510Z","dependency_job_id":null,"html_url":"https://github.com/wesx8/selecto","commit_stats":null,"previous_names":["westag/selecto"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wesx8/selecto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesx8%2Fselecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesx8%2Fselecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesx8%2Fselecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesx8%2Fselecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wesx8","download_url":"https://codeload.github.com/wesx8/selecto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesx8%2Fselecto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280448806,"owners_count":26332533,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dropdown","dropdown-menus","easy-to-use","javascript","js","lightweight","select-image","selecto","swift","vanilla-javascript","vanilla-js"],"created_at":"2025-10-22T13:44:35.667Z","updated_at":"2025-10-22T13:44:38.396Z","avatar_url":"https://github.com/wesx8.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selecto Dropdown: Select replacement with only pure Javascript\n\n## Description \n\nThis lightweight plugin replaces original html select tag with Selecto dropdown. \n\n## Features\n\n* Replaces original html select tag with Selecto dropdown\n* Supports images\n* Supports multiple selectboxes\n* No jQuery or other dependencies\n* Easy to use\n* Css is easy to customize\n* Tested in IE9 and above, Firefox 3-4, recent WebKit browsers, and Opera\n\n## Demo\n\n[Link](https://westag.github.io/selecto/)\n\n## Install\n\n### Bower\n```html\nnpm install westag-selecto\n```\n\n### npm\n```html\nnpm install westag-selecto\n```\n\n## Usage\n\nInstall via npm(see above) or Download/clone the files\n\nLink to JS file ex.:\n```html\n\u003cscript src=\"js/selecto.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\nLink to css file ex.:\n```html\n\u003clink href=\"css/selecto.css\" rel=\"stylesheet\"\u003e \n```\n\nOriginal dropdown you want to replace with Selecto's.\n```html\n\u003cselect id=\"select\"\u003e\n    \u003coption value=\"\"\u003eChoose color\u003c/option\u003e\n    \u003coption value=\"purple\"\u003ePurple\u003c/option\u003e\n    \u003coption value=\"blue\"\u003eBlue\u003c/option\u003e\n    \u003coption value=\"yellow\"\u003eYellow\u003c/option\u003e\n    \u003coption value=\"green\"\u003eGreen\u003c/option\u003e\n\u003c/select\u003e\n\n// support for images\n\u003cselect class=\"countries\" name=\"countries\"\u003e\n    \u003coption value=\"\"\u003eChoose country\u003c/option\u003e\n    \u003coption data-class=\"au\" value=\"australie\"\u003eAustralie\u003c/option\u003e\n    \u003coption data-class=\"cn\" value=\"engeland\"\u003eChina\u003c/option\u003e\n    \u003coption data-class=\"at\" value=\"austria\" selected=\"selected\"\u003eAustria\u003c/option\u003e\n    \u003coption data-class=\"jp\" value=\"japan\"\u003eJapan\u003c/option\u003e\n    \u003coption data-class=\"de\" value=\"germany\"\u003eGermany\u003c/option\u003e\n\u003c/select\u003e\n```\n\nTo initialize Selecto:\n```html\n// simple basic dropdown\nvar dropdown1 = new Selecto('#select');\n\n// with custom width and height\nvar dropdown2 = new Selecto('#select', {\n    height: 50,\n    width: 30\n});\n\n// dropdown with images\n var dropdown3 = new Selecto('.countries', {\n    width: 250,\n    height: '40',\n    renderFunction: myRender,\n    renderSelect: mySelect\n});\n\n// add images to items\nfunction myRender(country) {\n    var template, cssClass;\n\n    cssClass = country.getAttribute('data-class');\n    template = cssClass ? '\u003cspan class=\"color ' + cssClass + '\"\u003e\u003c/span\u003e' + country.textContent : country.textContent;\n\n    return template;\n}\n\n// add selected item image to button\nfunction mySelect(country) {\n    var template,\n      cssClass = country.getAttribute('data-class');\n\n    template = cssClass ? '\u003cspan class=\"color ' + cssClass + '\"\u003e\u003c/span\u003e' + country.textContent : country.textContent;\n\n    return template;\n}\n```\n\n## Methods\n\nMethod | Description\n------ | -----------\n.addValue() | change value\n.getValue() | get the selected value\n\n### Usage\n\n```html\nvar dropdown = new Selecto('#select');\n\n// set value\ndropdown.addValue('blue');\n\n// get the selected value\ndropdown.getValue();\n```\n\n## Events\n\nMethod | Description\n------ | -----------\nchange | change value\n\n### Usage\n\n```html\nvar dropdown = new Selecto('#select',\n  {\n      onChange: changing\n  });\n\nfunction changing(option) {\n    alert('testing');\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesx8%2Fselecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesx8%2Fselecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesx8%2Fselecto/lists"}