> For the complete documentation index, see [llms.txt](https://electoriaengine.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electoriaengine.gitbook.io/api/components/textbox.md).

# Textbox

input lord

```javascript
var textbox =new Textbox({
  name:"text",//textbox name
  position:{//you enter where it will be on the screen
    x:"50%",y:"50%"
  },
  scale:{//automatically adjusts if you do not add this
    x:"25px",
    y:"25px"
  },
  layer:100,//you don't have to type is automatically set to 100
  placeholder:"sa",//it writes into it what to do when you do nothing
  value:"selam",//comes with an automatic value
  eval:`
  console.log(event.data)
  //for example, write to console, you can use functions
  `,
  removeable:true//erases itself after sending data
})
```

{% hint style="info" %}
You don't have to add anything other than name and position.
{% endhint %}

```javascript
textboxfocus = function(key){
  console.log("You focused the textbox:"+key)//textbox name
}
```

{% embed url="<https://1070416189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2FrZJHDFE9w6Vle7nC2TUH%2Ftextbox.mp4?alt=media&token=945996cc-7f0d-44e5-8d42-e73bd6541cd4>" %}

## Update&#x20;

```javascript
textbox.update({
    value:"hi"
})
//or 
updateData({
    name:"textbox",
    value:"hi"
})
```

## Get

```javascript
console.log(textbox.get())
console.log(getData("textbox"))
//Example
console.log(
textbox.get().value
)
```

## Remove

```javascript
textbox.remove()
removeData("textbox")
```
