@coconut-xr/input
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@coconut-xr/input

Version License Twitter

input fields for 3D UIs with @coconut-xr/koestlich

npm i @coconut-xr/input

Usage

CodeSandbox

Screenshot

const [text1, setText1] = useState("Input Field");
const [text2, setText2] = useState("Text Area\nMultiline");
return (
  <Canvas {...inputCanvasProps}>
    <OrbitControls enableRotate={false} />
    <RootContainer backgroundColor="green" loadYoga={loadYoga}>
      <Input value={text1} onChange={setText1} />
      <TextArea value={text2} onChange={setText2} />
    </RootContainer>
  </Canvas>
);

inputCanvasProps sets onPointerDown on the canvas to prevent the default behavior which is required to prevent deselecting the currently selected input field.

Dependencies (0)

    Dev Dependencies (16)

    Package Sidebar

    Install

    npm i @coconut-xr/input

    Weekly Downloads

    21

    Version

    0.0.1

    License

    SEE LICENSE IN LICENSE

    Unpacked Size

    37.1 kB

    Total Files

    11

    Last publish

    Collaborators

    • cc-mjahn
    • bbohlender