static-cms/website/content/docs/widget-string.mdx
Daniel Lautzenheiser c55d1f912f
Improved types and updated documentation (#71)
* v1.0.0-alpha44
2022-11-07 10:27:58 -05:00

37 lines
775 B
Plaintext

---
group: Widgets
title: String
weight: 24
---
- **Name:** `string`
- **UI:** Text input
- **Data type:** `string`
The string widget translates a basic text input to a string value. For larger textarea inputs, use the text 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>
```yaml
name: title
label: Title
widget: string
```
```js
name: 'title',
label: 'Title',
widget: 'string',
```
</CodeTabs>