{"id":22361321,"url":"https://github.com/kei-k23/solid-rating","last_synced_at":"2026-03-11T12:11:24.202Z","repository":{"id":261950309,"uuid":"869005776","full_name":"Kei-K23/solid-rating","owner":"Kei-K23","description":"Highly customizable, zero dependency stars rating component for Solid 🌟","archived":false,"fork":false,"pushed_at":"2024-10-09T05:42:35.000Z","size":97,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T08:55:05.196Z","etag":null,"topics":["component","library","rating-stars","solid","solidjs","stars"],"latest_commit_sha":null,"homepage":"","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/Kei-K23.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":"2024-10-07T14:58:26.000Z","updated_at":"2025-01-12T18:26:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"b141e9a5-654b-48c7-88ed-fb34b88a84bd","html_url":"https://github.com/Kei-K23/solid-rating","commit_stats":null,"previous_names":["kei-k23/solid-rating"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kei-K23/solid-rating","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fsolid-rating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fsolid-rating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fsolid-rating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fsolid-rating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kei-K23","download_url":"https://codeload.github.com/Kei-K23/solid-rating/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fsolid-rating/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266498255,"owners_count":23938743,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["component","library","rating-stars","solid","solidjs","stars"],"created_at":"2024-12-04T16:29:19.594Z","updated_at":"2026-03-11T12:11:19.182Z","avatar_url":"https://github.com/Kei-K23.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 solid-rating 🌟\n\nHighly customizable, easy to use, declarative and zero dependency stars rating component for **Solid**.\n\n## Installation\n\n```bash\npnpm add solid-rating\n```\n\n```bash\nyarn add solid-rating\n```\n\n```bash\nnpm i solid-rating\n```\n\n## Usage\n\n1. Import CSS and Rating component\n\n```ts\n// Actual Rating component\nimport Rating from \"solid-rating\";\n// Import global CSS from node_modules folder\nimport \"./node_modules/solid-rating/dist/style.css\";\n```\n\n**Importing the CSS only once in the top-level file (most likely main.js or App.jsx) is enough to use Rating component throughout your App.**\n\n2. Use with default value\n\n```tsx\nimport { createEffect, createSignal } from \"solid-js\";\nimport \"./node_modules/solid-rating/dist/style.css\"; // Replace with your actual node_modules folder path\nimport Rating from \"solid-rating\";\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cdiv\n        style={{\n          display: \"flex\",\n          \"align-items\": \"center\",\n          \"justify-content\": \"center\",\n        }}\n      \u003e\n        \u003cRating\n          maxRating={5}\n          initialRating={3}\n          size={100}\n          color=\"#e4e5e9\"\n          activeColor=\"#Afc107\"\n          isDisabled\n          onChange={setValue}\n          onClick={setClickValue}\n        /\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n## API\n\n### 🌀 Core\n\n| Prop            | Description                                                             | Type         | Default  | Required                      |\n| --------------- | ----------------------------------------------------------------------- | ------------ | -------- | ----------------------------- |\n| `maxRating`     | Maximum number of rating items to display.                              | number       | 5        | ❌                            |\n| `initialRating` | Initial value for rating items                                          | number       | 0        | ❌                            |\n| `size`          | Size of rating item                                                     | number       | 24       | ❌                            |\n| `color`         | Color of rating item                                                    | string       | #e4e5e9  | ❌                            |\n| `activeColor`   | Color of rating item when they active                                   | string       | #ffc107  | ❌                            |\n| `halfFillMode`  | Allow user to point half value                                          | boolean      | false    | ❌                            |\n| `isRequired`    | Whether users should be able to set rating to 0 or not.                 | boolean      | false    | ❌                            |\n| `isDisabled`    | Whether to disable the radio group or not.                              | boolean      | false    | ❌                            |\n| `readOnly`      | Whether to render an accessible image element or not.                   | boolean      | false    | ❌                            |\n| `onChange`      | Setter signal or custom function to update the rating.                  | RatingChange | () =\u003e {} | Only if readOnly is **false** |\n| `onClick`       | Setter signal or custom function to get the current clicked star index. | RatingClick  | () =\u003e {} | Only if readOnly is **false** |\n\n## Acknowledgement\n\nThis project highly inspired from [@smastrom/react-rating](https://www.npmjs.com/package/@smastrom/react-rating) package.\n\n## Contributions\n\nAll contributions are very welcome. You can contributes by adding new features, create demo website in the [dev folder](/dev) and improve documentation.\n\n## LICENSE\n\nThis project is under [MIT-LICENSE](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-k23%2Fsolid-rating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkei-k23%2Fsolid-rating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-k23%2Fsolid-rating/lists"}