@corex/use-typed
TypeScript icon, indicating that this package has built-in type declarations

4.0.43 • Public • Published

title: '@corex/use-typed' custom_edit_url: 'https://github.com/iamvishnusankar/corex/edit/master/packages/use-typed/README.md'

Example Usage

Edit trusting-hypatia-frr0z

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

Readme

Keywords

Package Sidebar

Install

npm i @corex/use-typed

Weekly Downloads

2

Version

4.0.43

License

MIT

Unpacked Size

3.41 kB

Total Files

5

Last publish

Collaborators

  • iamvishnusankar