{"id":21623659,"url":"https://github.com/genebit/pckg-custom-select","last_synced_at":"2025-07-17T10:31:16.494Z","repository":{"id":160426036,"uuid":"551534543","full_name":"genebit/pckg-custom-select","owner":"genebit","description":"A free customizable select UI ","archived":true,"fork":false,"pushed_at":"2022-10-31T08:42:32.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-25T00:13:34.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/genebit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-14T15:28:24.000Z","updated_at":"2024-10-24T15:56:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e31ca0a5-b530-4d35-b762-10ad21cd3eb6","html_url":"https://github.com/genebit/pckg-custom-select","commit_stats":null,"previous_names":["genebit/pckg-custom-select"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genebit%2Fpckg-custom-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genebit%2Fpckg-custom-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genebit%2Fpckg-custom-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genebit%2Fpckg-custom-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genebit","download_url":"https://codeload.github.com/genebit/pckg-custom-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226248308,"owners_count":17595160,"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-11-25T00:13:37.330Z","updated_at":"2024-11-25T00:13:38.200Z","avatar_url":"https://github.com/genebit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Custom Select**\n\nA jquery form design plugin that customizes form inputs such as:\n\n-   input (floating labels)\n-   select (single/multiple)\n\n## **How to use**\n\nImport the files to your html header\n\n```html\n\u003chead\u003e\n\t\u003c!-- Fontawesome (required for icon) --\u003e\n\t\u003clink rel=\"stylesheet\" href=\"/path/to/fontawesome.min.css\" /\u003e\n\n\t\u003c!-- Bootstrap 5 (optional) --\u003e\n\t\u003clink rel=\"stylesheet\" href=\"/path/to/bootstrap.min.css\" /\u003e\n\n\t\u003c!-- Custom Select CSS (required) --\u003e\n\t\u003clink rel=\"stylesheet\" href=\"custom-select.css\" /\u003e\n\n\t\u003c!-- Jquery (required) --\u003e\n\t\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n\n\t\u003c!-- Custom Select JS (required) --\u003e\n\t\u003c!-- Make sure it is below jquery --\u003e\n\t\u003cscript defer src=\"custom-select.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\n### **Single Select Input**\n\nSyntax for using custom select. In here you can modify:\n\n-   Caret icon\n-   Search icon\n-   Remove search container and not have search functionality\n\n**NOTE:**\n\n-   It is important to use the custom tagnames for it to be recognized in the script\n-   A value is required\n\n```html\n\u003ccselect id=\"ExampleId\" single\u003e\n\t\u003ccselect-head\u003e\n\t\t\u003clabel\u003e\u003c/label\u003e\n\t\t\u003csection\u003e\n\t\t\t\u003cinput readonly type=\"text\" placeholder=\"\" /\u003e\n\t\t\t\u003ci class=\"fa fa-solid fa-caret-down\"\u003e\u003c/i\u003e\n\t\t\u003c/section\u003e\n\t\u003c/cselect-head\u003e\n\t\u003ccselect-options\u003e\n\t\t\u003csearch-container\u003e\n\t\t\t\u003cinput type=\"text\" searchfield placeholder=\"Search\" /\u003e\n\t\t\t\u003ci class=\"fa fa-solid fa-search\"\u003e\u003c/i\u003e\n\t\t\u003c/search-container\u003e\n\t\t\u003ccoption value=\"\"\u003e\u003c/coption\u003e\n\t\t...\n\t\u003c/cselect-options\u003e\n\u003c/cselect\u003e\n```\n\n### **Floating Dropdown**\n\n- Simply add the class `float` to the `\u003ccselect-options\u003e` tag\n\n```html\n\u003ccselect id=\"ExampleId\" single\u003e\n\t\u003ccselect-head\u003e\n\t\t\u003clabel\u003e\u003c/label\u003e\n\t\t\u003csection\u003e\n\t\t\t\u003cinput readonly type=\"text\" placeholder=\"\" /\u003e\n\t\t\t\u003ci class=\"fa fa-solid fa-caret-down\"\u003e\u003c/i\u003e\n\t\t\u003c/section\u003e\n\t\u003c/cselect-head\u003e\n\t\u003ccselect-options class=\"float\"\u003e\n\t\t\u003csearch-container\u003e\n\t\t\t\u003cinput type=\"text\" searchfield placeholder=\"Search\" /\u003e\n\t\t\t\u003ci class=\"fa fa-solid fa-search\"\u003e\u003c/i\u003e\n\t\t\u003c/search-container\u003e\n\t\t\u003ccoption value=\"\"\u003e\u003c/coption\u003e\n\t\t...\n\t\u003c/cselect-options\u003e\n\u003c/cselect\u003e\n```\n\n### **Custom Form Inputs**\n\nUse the class `cform-input` to `input` type elements. Labels here are not required\n\n```html\n\u003cdiv class=\"col-sm-12\"\u003e\n\t\u003clabel for=\"BirthDay\"\u003eBirth Day\u003c/label\u003e\n\t\u003cinput id=\"BirthDay\" class=\"cform-input\" type=\"date\" /\u003e\n\u003c/div\u003e\n```\n\nFor **floating labels only**, wrap them in a div with a class `floating-cform-label`.\nNote that `\u003clabel\u003e` is required.\n\n```html\n\u003cdiv class=\"floating-cform-label\"\u003e\n\t\u003clabel for=\"Sample\"\u003e\u003c/label\u003e\n\t\u003cinput id=\"Sample\" class=\"cform-input\" type=\"date\" /\u003e\n\u003c/div\u003e\n```\n\nFor **floating labels on input type fields**, wrap them in a div with a class `floating-cform-input`.\nNote that `\u003clabel\u003e` is required.\n\n```html\n\u003cdiv class=\"floating-cform-input\"\u003e\n\t\u003cinput id=\"FullName\" class=\"cform-input\" type=\"text\" /\u003e\n\t\u003clabel for=\"FullName\"\u003eFull Name\u003c/label\u003e\n\u003c/div\u003e\n```\n\n### **Eventlisteners**\n\nTo get the value of the single select input. It is required to put the `setTimeout()` function.\n\n```js\n// sample onchange event on cselect\n$(`#SingleSelectExample1`).change(function () {\n\tsetTimeout(() =\u003e {\n\t\tconsole.log($(this).attr(\"value\"));\n\t}, 100);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenebit%2Fpckg-custom-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenebit%2Fpckg-custom-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenebit%2Fpckg-custom-select/lists"}