Skip to content

29cmb/React-CamFrame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Camera Frame

A react component that allows you to use the keyboard to move around components. Used in the overflow project for the workflow builder

How to use

You can create a CameraFrame by using the CameraZone component

import { CameraZone } from "react-camframe";

function Page(){
    return (
        <div id="camZone">
            <CameraZone>
                <div pos={[0,0]}>
                    <p>hi</p>
                </div>
                <div pos={[30,30]}>
                    <p>Hi from x30 y30</p>
                </div>
            </CameraZone>
        </div>
    )
}

export default Page

Children of the CameraZone must have a pos element which determines their offset from the center of the screen (0,0)

About

React camframe npm package

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors