{"id":14990140,"url":"https://github.com/substrate-system/radio-input","last_synced_at":"2025-04-12T02:05:23.107Z","repository":{"id":249844995,"uuid":"831991380","full_name":"substrate-system/radio-input","owner":"substrate-system","description":"Radio buttons with style","archived":false,"fork":false,"pushed_at":"2025-04-07T21:32:37.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T02:05:17.985Z","etag":null,"topics":["webcomponent"],"latest_commit_sha":null,"homepage":"https://substrate-system.github.io/radio-input/","language":"TypeScript","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/substrate-system.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-07-22T06:21:24.000Z","updated_at":"2025-03-26T05:04:19.000Z","dependencies_parsed_at":"2024-12-21T08:28:57.033Z","dependency_job_id":"e5ad845f-783d-48b3-93d8-541fdc2807ec","html_url":"https://github.com/substrate-system/radio-input","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.17391304347826086","last_synced_commit":"a2d5220bde5f29efe6fb3f5566217a76e5b8a288"},"previous_names":["substrate-system/radio-input"],"tags_count":4,"template":false,"template_full_name":"substrate-system/template-web-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substrate-system%2Fradio-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substrate-system%2Fradio-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substrate-system%2Fradio-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/substrate-system%2Fradio-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/substrate-system","download_url":"https://codeload.github.com/substrate-system/radio-input/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505863,"owners_count":21115354,"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":["webcomponent"],"created_at":"2024-09-24T14:19:34.361Z","updated_at":"2025-04-12T02:05:23.087Z","avatar_url":"https://github.com/substrate-system.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# radio input\n![tests](https://github.com/substrate-system/radio-input/actions/workflows/nodejs.yml/badge.svg)\n[![types](https://img.shields.io/npm/types/@substrate-system/radio-input?style=flat-square)](README.md)\n[![module](https://img.shields.io/badge/module-ESM%2FCJS-blue?style=flat-square)](README.md)\n[![install size](https://packagephobia.com/badge?p=@substrate-system/radio-input)](https://packagephobia.com/result?p=@substrate-system/radio-input)\n[![semantic versioning](https://img.shields.io/badge/semver-2.0.0-blue?logo=semver\u0026style=flat-square)](https://semver.org/)\n[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n\nRadio inputs with some style. [See a live demo](https://substrate-system.github.io/radio-input/)\n\n\u003c!-- toc --\u003e\n\n- [install](#install)\n- [API](#api)\n  * [ESM](#esm)\n  * [attributes](#attributes)\n- [CSS](#css)\n  * [Import CSS](#import-css)\n  * [CSS variables](#css-variables)\n- [Example](#example)\n  * [HTML](#html)\n  * [pre-built](#pre-built)\n\n\u003c!-- tocstop --\u003e\n\n## install\n\n```sh\nnpm i -S @substrate-system/radio-input\n```\n\n## API\n\nThis exposes ESM and common JS via [package.json `exports` field](https://nodejs.org/api/packages.html#exports). Just import the package, then use the tag, `\u003cradio-input\u003e`, in HTML.\n\n### ESM\n```js\nimport '@substrate-system/radio-input'\nimport '@substrate-system/radio-input/css'\n// or minified CSS\nimport '@substrate-system/radio-input/css/min'\n```\n\n### attributes\n\nIn addition to standard `input[type=radio]` attributes, you can pass in the following\n\n#### `label`\nPass in some text to use as the label element.\n\n## CSS\n\n### Import CSS\n\n```js\nimport '@substrate-system/radio-input/css'\n```\n\nOr minified:\n```js\nimport '@substrate-system/radio-input/css/min'\n```\n\n### CSS variables\nOverride these to customize\n\n```css\nradio-input {\n    --form-control-color: #4281CB;\n}\n```\n\n## Example\nThis calls the global function `customElements.define`. Just import, then use\nthe tag in your HTML.\n\n```js\nimport '@substrate-system/radio-input'\nimport '@substrate-system/radio-input/css'\n```\n\n### HTML\n```html\n\u003cform\u003e\n    \u003cradio-input\n        name=\"example\"\n        value=\"example1\"\n        label=\"example one\"\n    \u003e\u003c/radio-input\u003e\n    \u003cradio-input\n        name=\"example\"\n        value=\"example2\"\n        label=\"example two\"\n    \u003e\u003c/radio-input\u003e\n\n    \u003cbutton type=\"submit\"\u003esubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\n### pre-built\nThis package exposes minified JS and CSS files too. Copy them to a location that is\naccessible to your web server, then link to them in HTML.\n\n#### copy\n```sh\ncp ./node_modules/@substrate-system/radio-input/dist/index.min.js ./public/radio-input.min.js\ncp ./node_modules/@substrate-system/radio-input/dist/style.min.css ./public/radio-input.min.css\n```\n\n#### HTML\n```html\n\u003chead\u003e\n    \u003clink rel=\"stylesheet\" href=\"./radio-input.min.css\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript type=\"module\" src=\"./radio-input.min.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubstrate-system%2Fradio-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubstrate-system%2Fradio-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubstrate-system%2Fradio-input/lists"}