{"id":13525475,"url":"https://github.com/bboydflo/flagstrap-preact","last_synced_at":"2026-01-02T06:44:22.894Z","repository":{"id":57237868,"uuid":"110459479","full_name":"bboydflo/flagstrap-preact","owner":"bboydflo","description":"flagstrap jquery plugin ported to preact","archived":false,"fork":false,"pushed_at":"2017-11-12T22:34:44.000Z","size":3898,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-23T12:47:38.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bboydflo.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-12T18:50:50.000Z","updated_at":"2023-02-15T19:32:32.000Z","dependencies_parsed_at":"2022-08-26T15:01:46.637Z","dependency_job_id":null,"html_url":"https://github.com/bboydflo/flagstrap-preact","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/bboydflo%2Fflagstrap-preact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bboydflo%2Fflagstrap-preact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bboydflo%2Fflagstrap-preact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bboydflo%2Fflagstrap-preact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bboydflo","download_url":"https://codeload.github.com/bboydflo/flagstrap-preact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707382,"owners_count":20334619,"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-08-01T06:01:19.114Z","updated_at":"2026-01-02T06:44:22.845Z","avatar_url":"https://github.com/bboydflo.png","language":"CSS","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## `\u003cFlagstrap /\u003e` for Preact\r\n\r\nA dropdown component that makes it possible to choose a country from a [list](https://github.com/bboydflo/flagstrap-preact/blob/master/src/js/countries.js). This component is suited only together with Bootstrap 3 styles and is a direct port of the [following plugin](https://github.com/blazeworx/flagstrap)\r\n\r\n## Installation\r\n```sh\r\n$ npm install flagstrap-preact\r\n```\r\n\r\n\r\n\r\n\u003e Make sure to enable transpilation for this module! Check [.babelrc](https://github.com/bboydflo/flagstrap-preact/blob/master/.babelrc) and [webpack configuration](https://github.com/bboydflo/flagstrap-preact/blob/master/https://github.com/bboydflo/flagstrap-preact/blob/master/webpack.config.js) if you have troubles.\r\n\r\n\r\n\r\n## Usage Example\r\n\r\n\r\n```js\r\nconst onChanged = (countryCode) =\u003e {\r\n  console.log('new selected country: ', countryCode);\r\n}\r\n\r\n\u003cFlagstrap\r\n  countries={\r\n    'AF': 'Afghanistan',\r\n    'AL': 'Albania',\r\n    'DZ': 'Algeria',\r\n    'AS': 'American Samoa'\r\n  }\r\n  choose={'Choose language'}\r\n  onChange={onChanged}\r\n/\u003e\r\n```\r\n\r\n\r\n#### Demo\r\n\r\n\u003cimg alt=\"preview\" src=\"https://github.com/bboydflo/flagstrap-preact/blob/master/flagstrap-preact.gif\" width=\"720\"\u003e\r\n\r\n---\r\n\r\n\r\n## Props\r\n\r\n| Prop                | Type       | Description         |\r\n|---------------------|------------|---------------------|\r\n| **`countries`**     | _Object_   | Object containing country code as keys and country names as values\r\n| **`choose`**        | _String_   | Default dropdown label.\r\n| **`selected`**      | _String_   | Default selected country code\r\n| **`onChange`**      | _Function_ | Prop to handle dropdown change outside of Flagstrap component\r\n\r\n\r\n\r\n---\r\n\r\n\r\n### License\r\n\r\n[MIT]\r\n\r\n\r\n[MIT]: http://choosealicense.com/licenses/mit/\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbboydflo%2Fflagstrap-preact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbboydflo%2Fflagstrap-preact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbboydflo%2Fflagstrap-preact/lists"}