https://github.com/brianpeiris/aframe-textarea-component
A Textarea component for A-Frame
https://github.com/brianpeiris/aframe-textarea-component
aframe webxr
Last synced: 3 months ago
JSON representation
A Textarea component for A-Frame
- Host: GitHub
- URL: https://github.com/brianpeiris/aframe-textarea-component
- Owner: brianpeiris
- License: mit
- Created: 2017-10-05T00:57:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T11:02:34.000Z (over 1 year ago)
- Last Synced: 2026-01-18T22:34:02.950Z (5 months ago)
- Topics: aframe, webxr
- Language: JavaScript
- Homepage: https://brianpeiris.github.io/aframe-textarea-component
- Size: 3.27 MB
- Stars: 17
- Watchers: 2
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## aframe-textarea-component
[](https://npmjs.org/package/aframe-textarea-component)
[](https://npmjs.org/package/aframe-textarea-component)
A Textarea component for [A-Frame](https://aframe.io).
### Examples
- [Basic Example](https://brianpeiris.github.io/aframe-textarea-component/examples/basic/)

### 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](dist):
```html
My A-Frame Scene
```
#### npm
Install via npm:
```bash
npm install aframe-textarea-component
```
Then require and use.
```js
require('aframe');
require('aframe-textarea-component');
```