{"id":22525337,"url":"https://github.com/minimalist-components/mn-option","last_synced_at":"2025-06-11T14:13:34.440Z","repository":{"id":57299313,"uuid":"68109203","full_name":"minimalist-components/mn-option","owner":"minimalist-components","description":"a checkbox and radio component","archived":false,"fork":false,"pushed_at":"2018-12-09T21:24:54.000Z","size":307,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T07:45:33.838Z","etag":null,"topics":["checkbox","purejs","radio","web-components"],"latest_commit_sha":null,"homepage":"","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/minimalist-components.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-13T13:08:01.000Z","updated_at":"2017-03-17T17:47:44.000Z","dependencies_parsed_at":"2022-08-26T18:02:56.434Z","dependency_job_id":null,"html_url":"https://github.com/minimalist-components/mn-option","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minimalist-components%2Fmn-option","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minimalist-components%2Fmn-option/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minimalist-components%2Fmn-option/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minimalist-components%2Fmn-option/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minimalist-components","download_url":"https://codeload.github.com/minimalist-components/mn-option/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minimalist-components%2Fmn-option/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259280322,"owners_count":22833424,"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":["checkbox","purejs","radio","web-components"],"created_at":"2024-12-07T06:09:54.528Z","updated_at":"2025-06-11T14:13:34.419Z","avatar_url":"https://github.com/minimalist-components.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/minimalist-components/mn-option.svg)](https://travis-ci.org/minimalist-components/mn-option) \n[![npm version](https://badge.fury.io/js/mn-option.svg)](https://badge.fury.io/js/mn-option)\n[![Dependency Status](https://gemnasium.com/badges/github.com/minimalist-components/mn-option.svg)](https://gemnasium.com/github.com/minimalist-components/mn-option)\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n\n# mn-option\n\nMinimalist radio/checkbox component, agnostic to framworks.\n\nSee the [demo](https://minimalist-components.github.io/mn-option/)\n\n\u003ca href=\"https://minimalist-components.github.io/mn-option/\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/minimalist-components/mn-option/master/preview.gif\"\u003e\n\u003c/a\u003e\n\n### Install\n\n```sh\nnpm install --save mn-option\n```\n\nAnd bundle dependencies and main files in [dist/](https://github.com/minimalist-components/mn-option/tree/master/dist) with your preferred tool.\n\n### Usage\n\nAdd to your html, the tag ```mn-option``` with respective type, default is checkbox, e.g.\n\n```html\n\u003c!-- checkbox --\u003e\n\u003cmn-option placeholder=\"Stark\" name=\"gender\"\u003e\u003c/mn-option\u003e\n\u003cmn-option placeholder=\"Lannister\" name=\"gender\"\u003e\u003c/mn-option\u003e\n\u003cmn-option placeholder=\"Targaryen\" name=\"gender\"\u003e\u003c/mn-option\u003e\n```\n\n\nTo define as radio, use the attribute `type`\n\n```html\n\u003c!-- radio --\u003e\n\u003cmn-option placeholder=\"Female\" name=\"gender\" type=\"radio\"\u003e\u003c/mn-option\u003e\n\u003cmn-option placeholder=\"Male\" name=\"gender\" type=\"radio\"\u003e\u003c/mn-option\u003e\n```\n\n#### Custom attributes\n\n- placeholder - custom attribute, to define the text visible\n- type (only checkbox and radio)\n\n#### Natural checkbox or radio\n\nIs just a css class, to define a minimal design. Useful in some cases. E.g.\n\n```html\n\u003c!-- checkboxes, but if you want radio, just implement the type attribute with radio value --\u003e\n\u003cmn-option class=\"natural\" placeholder=\"Stark\" name=\"gender\"\u003e\u003c/mn-option\u003e\n\u003cmn-option class=\"natural\" placeholder=\"Lannister\" name=\"gender\"\u003e\u003c/mn-option\u003e\n\u003cmn-option class=\"natural\" placeholder=\"Targaryen\" name=\"gender\"\u003e\u003c/mn-option\u003e\n```\n\n\nThe following attributes from inputs are supported in this component\n\n- [autofocus](http://www.w3schools.com/tags/att_input_autofocus.asp)\n- [checked](http://www.w3schools.com/tags/att_input_checked.asp)\n- [disabled](http://www.w3schools.com/tags/att_input_disabled.asp)\n- [readonly](http://www.w3schools.com/tags/att_input_readonly.asp)\n- [name](http://www.w3schools.com/tags/att_input_name.asp)\n- [required](http://www.w3schools.com/tags/att_input_required.asp)\n- [value](http://www.w3schools.com/tags/att_input_value.asp)\n- [id](https://www.w3schools.com/tags/att_global_id.asp)\n\nToo works with a separted ```label``` with an attribute ```for```\n- [label for](https://www.w3schools.com/tags/att_label_for.asp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminimalist-components%2Fmn-option","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminimalist-components%2Fmn-option","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminimalist-components%2Fmn-option/lists"}