Skip to content

Scriptor-Group/road-between-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

road-between-elements

Create path road between react elements

How to use

import { RoadGenerator, RoadCheckpoint } from "road-between-elements";

const MyComponent = () => {
  const [path, setPath] = useState(undefined);

  useEffect(() => {
    window.addEventListener('scroll', handleScroll);
  }, [])

  return <RoadGenerator onPathChange={path => path(path)}>
    <h1>Hello</h2>
    <RoadCheckpoint position="leftTop">
      <p>How are you</p>
    </RoadCheckpoint>
    <RoadCheckpoint position="rightBottom">
      <p>Test</p>
    </RoadCheckpoint>
  </RoadGenerator>
}

About

Create path road between react elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published