React hook designed to display animated headlines
npm install use-typing-headlinesReact hook designed to display animated headlines
```
npm install use-typing-headlines
src="images/one-headline-preview.gif"
alt="One headline preview"
height="60"
/>
`tsx
import { useTypingHeadlines } from 'use-typing-headlines';
const Component = () => {
const [headline] = useTypingHeadlines([
'First you see this',
'Then you see this',
'Lastly, this',
]);
return
$3
src="images/two-headlines-preview.gif"
alt="Two headlines preview"
height="120"
/>
`tsx
const Component = () => {
const [headlineOne] = useTypingHeadlines([
'Peanut Butter',
'Copy',
'Barb',
'Arts',
]); const [headlineTwo] = useTypingHeadlines([
'Jelly',
'Paste',
'Star',
'Crafts',
]);
return
{headlineOne} &
{headlineTwo}_
;
}
`$3
`tsx
const Component = () => {
const [headlineLive, headlineStatic] = useTypingHeadlines([
'This text will be tranlated for screen readers',
'Updating one full word at a time ...',
]); return <>
{headlineLive}
{headlineStatic}
;
>;
}
``