@corex/use-typed
v4.0.43
Published
--- title: '@corex/use-typed' custom_edit_url: 'https://github.com/iamvishnusankar/corex/edit/master/packages/use-typed/README.md' ---
Downloads
200
Readme
title: '@corex/use-typed' custom_edit_url: 'https://github.com/iamvishnusankar/corex/edit/master/packages/use-typed/README.md'
Example Usage
import React from 'react'
import useTyped from '@corex/use-typed'
export const Hello = () => {
const typedRef = React.useRef(null)
useTyped(typedRef, {
strings: ['example', 'something else', 'another'],
typeSpeed: 50,
backSpeed: 30,
loop: true,
showCursor: false,
})
return (
<h2>
Hello,{' '}
<span
style={{ color: 'dodgerblue' }}
className="text-success"
ref={typedRef}
/>{' '}
text
</h2>
)
}
export default Hello