{"id":16547642,"url":"https://github.com/sambecker/use-typing-headlines","last_synced_at":"2025-06-18T15:42:42.491Z","repository":{"id":57388479,"uuid":"445240353","full_name":"sambecker/use-typing-headlines","owner":"sambecker","description":"React hook designed to display animated headlines","archived":false,"fork":false,"pushed_at":"2022-01-10T23:24:29.000Z","size":252,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-17T12:10:05.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/use-typing-headlines","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/sambecker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-06T16:40:50.000Z","updated_at":"2024-04-04T22:56:05.000Z","dependencies_parsed_at":"2022-09-11T03:30:36.107Z","dependency_job_id":null,"html_url":"https://github.com/sambecker/use-typing-headlines","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambecker%2Fuse-typing-headlines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambecker%2Fuse-typing-headlines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambecker%2Fuse-typing-headlines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambecker%2Fuse-typing-headlines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sambecker","download_url":"https://codeload.github.com/sambecker/use-typing-headlines/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859164,"owners_count":16556037,"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-10-11T19:22:27.694Z","updated_at":"2024-10-11T19:22:28.243Z","avatar_url":"https://github.com/sambecker.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/use-typing-headlines.svg)](https://badge.fury.io/js/use-typing-headlines)\n\n# 💻 useTypingHeadlines\n\nReact hook designed to display animated headlines\n\n## Installation\n\n```\nnpm install use-typing-headlines\n```\n\n## Usage\n\n### One headline\n\n\u003cimg\n  src=\"images/one-headline-preview.gif\"\n  alt=\"One headline preview\"\n  height=\"60\"\n/\u003e\n\n```tsx\nimport { useTypingHeadlines } from 'use-typing-headlines';\n\nconst Component = () =\u003e {\n  const [headline] = useTypingHeadlines([\n    'First you see this',\n    'Then you see this',\n    'Lastly, this',\n  ]);\n\n  return \u003ch1\u003e{headline}\u003c/h1\u003e;\n}\n```\n\n### Multiple headlines\n\n\u003cimg\n  src=\"images/two-headlines-preview.gif\"\n  alt=\"Two headlines preview\"\n  height=\"120\"\n/\u003e\n\n```tsx\nconst Component = () =\u003e {\n  const [headlineOne] = useTypingHeadlines([\n    'Peanut Butter',\n    'Copy',\n    'Barb',\n    'Arts',\n  ]);\n\n  const [headlineTwo] = useTypingHeadlines([\n    'Jelly',\n    'Paste',\n    'Star',\n    'Crafts',\n  ]);\n\n  return \u003ch1\u003e\n    {headlineOne} \u0026amp;\u003cbr /\u003e\n    {headlineTwo}\u003cspan style={{ visibility: 'hidden' }}\u003e_\u003c/span\u003e\n  \u003c/h1\u003e;\n}\n```\n\n### Accessibility (BETA)\n\n```tsx\nconst Component = () =\u003e {\n  const [headlineLive, headlineStatic] = useTypingHeadlines([\n    'This text will be tranlated for screen readers',\n    'Updating one full word at a time ...',\n  ]);\n\n  return \u003c\u003e\n    \u003ch1 role=\"img\" aria-describedby=\"ariaId\"\u003e\n      {headlineLive}\n    \u003c/h1\u003e\n    \u003cdiv id=\"ariaId\" aria-live=\"polite\" style={{ visible: 'hidden' }}\u003e\n      {headlineStatic}\n    \u003c/div\u003e;\n  \u003c/\u003e;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambecker%2Fuse-typing-headlines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsambecker%2Fuse-typing-headlines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambecker%2Fuse-typing-headlines/lists"}