Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianpeiris/aframe-textarea-component
A Textarea component for A-Frame
https://github.com/brianpeiris/aframe-textarea-component
aframe webxr
Last synced: 2 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 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T11:02:34.000Z (4 months ago)
- Last Synced: 2024-10-12T22:17:57.516Z (3 months ago)
- Topics: aframe, webxr
- Language: JavaScript
- Homepage: https://brianpeiris.github.io/aframe-textarea-component
- Size: 3.27 MB
- Stars: 18
- Watchers: 4
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## aframe-textarea-component
[![Version](http://img.shields.io/npm/v/aframe-textarea-component.svg?style=flat-square)](https://npmjs.org/package/aframe-textarea-component)
[![License](http://img.shields.io/npm/l/aframe-textarea-component.svg?style=flat-square)](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/)
![Demo gif](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](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');
```