{"id":18563161,"url":"https://github.com/compulim/use-read-alert","last_synced_at":"2025-08-11T00:33:48.729Z","repository":{"id":65503177,"uuid":"593064679","full_name":"compulim/use-read-alert","owner":"compulim","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-20T05:37:53.000Z","size":530,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-27T16:52:11.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/compulim.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":"2023-01-25T06:16:29.000Z","updated_at":"2023-01-27T07:18:10.000Z","dependencies_parsed_at":"2024-11-06T22:22:04.888Z","dependency_job_id":null,"html_url":"https://github.com/compulim/use-read-alert","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.34375,"last_synced_commit":"d12b81fb8508136f4aa1a56e3c1ad4c3b6a4987f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/compulim/use-read-alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fuse-read-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fuse-read-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fuse-read-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fuse-read-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/use-read-alert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fuse-read-alert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269813581,"owners_count":24479340,"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-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-11-06T22:11:57.234Z","updated_at":"2025-08-11T00:33:48.663Z","avatar_url":"https://github.com/compulim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `use-read-alert`\n\nA callback hook to read assertive alert by the screen reader.\n\n## Background\n\n## How to use\n\nInstalls the provider component. The provider component is required to use the `useReadAlert` hook.\n\n```tsx\nimport { UseReadAlertProvider } from 'use-read-alert';\n\nReact.createRoot(document.getElementById('root')).render(\n  \u003cUseReadAlertProvider\u003e\n    \u003cApp /\u003e\n  \u003c/UseReadAlertProvider\u003e\n);\n```\n\nThen, in your React component, calls the callback function to read the alert message.\n\n```tsx\nimport { useReadAlert } from 'use-read-alert';\n\nconst MyComponent = () =\u003e {\n  const readAlert = useReadAlert();\n\n  readAlert('Hello, World!');\n\n  // ...\n};\n```\n\n## API\n\n```ts\nfunction UseReadAlertProvider(PropsWithChildren\u003c{\n   alertClassName?: string;\n}\u003e);\n\nfunction useReadAlert(): (message: string) =\u003e void;\n```\n\nBy default, the `alert` role will be hidden using CSS. If you prefer to hide it using your own CSS, you can provide an `alertClassName`.\n\n## Behaviors\n\n## Contributions\n\nLike us? [Star](https://github.com/compulim/use-read-alert/stargazers) us.\n\nWant to make it better? [File](https://github.com/compulim/use-read-alert/issues) us an issue.\n\nDon't like something you see? [Submit](https://github.com/compulim/use-read-alert/pulls) a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fuse-read-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Fuse-read-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fuse-read-alert/lists"}