static-cms/website/content/docs/widget-text.mdx

37 lines
792 B
Plaintext
Raw Normal View History

2022-09-30 11:39:35 -04:00
---
group: Widgets
title: Text
weight: 25
2022-09-30 11:39:35 -04:00
---
- **Name:** `text`
2022-11-02 15:42:21 -04:00
- **UI:** Textarea
- **Data type:** `string`
The text widget takes a multiline text field and saves it as a string. For shorter text inputs, use the string widget.
## Widget options
For common options, see [Common widget options](/docs/widgets#common-widget-options).
| Name | Type | Default | Description |
| ------- | ------ | ------- | ------------------------------------------------------------- |
| default | string | `''` | _Optional_. The default value for the field. Accepts a string |
## Example
<CodeTabs>
2022-11-02 15:42:21 -04:00
```yaml
name: description
label: Description
widget: text
```
```js
name: 'description',
label: 'Description',
widget: 'text',
```
</CodeTabs>