{"id":15999675,"url":"https://github.com/kcmr/liquid-switch","last_synced_at":"2025-04-05T01:14:42.686Z","repository":{"id":58223118,"uuid":"83993153","full_name":"kcmr/liquid-switch","owner":"kcmr","description":"Web Component that acts as a checkbox with the appearance of a switch","archived":false,"fork":false,"pushed_at":"2017-03-06T00:52:29.000Z","size":2631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T11:47:18.509Z","etag":null,"topics":["a11y","checkbox","custom-elements","polymer","switch","switch-control","web-components"],"latest_commit_sha":null,"homepage":"","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/kcmr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-05T18:40:04.000Z","updated_at":"2017-03-05T23:25:14.000Z","dependencies_parsed_at":"2022-08-31T03:00:48.859Z","dependency_job_id":null,"html_url":"https://github.com/kcmr/liquid-switch","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fliquid-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fliquid-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fliquid-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fliquid-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kcmr","download_url":"https://codeload.github.com/kcmr/liquid-switch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271527,"owners_count":20911587,"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":["a11y","checkbox","custom-elements","polymer","switch","switch-control","web-components"],"created_at":"2024-10-08T09:00:51.226Z","updated_at":"2025-04-05T01:14:42.657Z","avatar_url":"https://github.com/kcmr.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u0026lt;liquid-switch\u0026gt;\n\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg?style=flat-square)](https://www.webcomponents.org/element/kcmr/liquid-switch)\n\n_[Demo and API docs](https://kcmr.github.io/liquid-switch/components/liquid-switch/)_\n\n`\u003cliquid-switch\u003e` is a custom element that acts as a checkbox and has the appearance of a switch.\n\n\u003c!---\n```html\n\u003ccustom-element-demo\u003e\n  \u003ctemplate\u003e\n    \u003cscript src=\"../webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n    \u003clink rel=\"import\" href=\"liquid-switch.html\"\u003e\n    \u003cstyle is=\"custom-style\"\u003e\n    liquid-switch {\n      font-family: sans-serif;\n      max-width: 300px;\n      background-color: rgb(228, 225, 214);\n      border-radius: 2px;\n      padding: 10px;\n    }\n    \u003c/style\u003e\n    \u003cnext-code-block\u003e\u003c/next-code-block\u003e\n  \u003c/template\u003e\n\u003c/custom-element-demo\u003e\n```\n--\u003e\n```html\n\u003cliquid-switch checked\u003eSwitch label\u003c/liquid-switch\u003e\n```\n\n## Installation and usage\n\n1. Install the component using [Bower](http://bower.io/):   \n\n  ```bash\n  $ bower liquid-switch i -S\n  ```\n2. Import Web Components polyfill:   \n\n  ```js\n  \u003cscript src=\"bower_components/webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n  ```\n3. Import Custom Element:   \n\n  ```html\n  \u003clink rel=\"import\" href=\"bower_components/liquid-switch/liquid-switch.html\"\u003e\n  ```\n4. Use it!:   \n\n  ```html\n  \u003cliquid-switch checked\u003eSwitch label\u003c/liquid-switch\u003e\n  ```\n\n## Styling\n\nThe following custom properties and mixins are available for styling.\n\n__Note:__ all the values are unitless but border-radius.\n\nCustom property | Description | Default\n:-- | :-- | :--\n--liquid-switch-switch-background-color | Background color of the switch | #f5f5f5\n--liquid-switch-switch-width | Switch width | 40\n--liquid-switch-switch-padding | Padding between switch and knob | 3\n--liquid-switch-border-radius | border-radius of the switch | 10px\n--liquid-switch-knob-color-on | Knob checked color | #7eb30f\n--liquid-switch-knob-color-off | Knob unchecked color | #aeb5ae\n--liquid-switch-knob-size | Size of the knob (width and height) | 16\n--liquid-switch-bar | Empty mixin applied to the switch | {}\n--liquid-switch-knob | Empty mixin applied to the knob | {}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fliquid-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcmr%2Fliquid-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fliquid-switch/lists"}