aframe-textarea-component

0.3.0 • Public • Published

aframe-textarea-component

Version License

A Textarea component for A-Frame.

Examples

Demo gif

Known issues

  • Does not support text word-wrap.
  • Only supports monospace fonts.

API

Property Description Default Value
cols number of columns in the textarea 40
rows number of rows in the textarea 20
color color of the text black
disabled whether the control can receive keyboard inputs false
selectionColor color of selected text grey
backgroundColor color of the background white
disabledBackgroundColor color of the background when disabled lightgrey
text default text in the textarea ''
Method Description
getText() Get the current text in the textarea
focus() Focus the textarea
blur() Blur the textarea

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-textarea-component/dist/aframe-textarea-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity textarea></a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-textarea-component

Then require and use.

require('aframe');
require('aframe-textarea-component');

Package Sidebar

Install

npm i aframe-textarea-component

Weekly Downloads

2

Version

0.3.0

License

MIT

Unpacked Size

44.7 kB

Total Files

6

Last publish

Collaborators

  • brianpeiris