static-cms/packages/docs/content/docs/widget-string.mdx
Daniel Lautzenheiser 799c7e6936
feat: v4.0.0 (#1016)
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Mathieu COSYNS <64072917+Mathieu-COSYNS@users.noreply.github.com>
2024-01-03 15:14:09 -05:00

39 lines
965 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 |
| prefix | string | `''` | _Optional_. Text to show before string input |
| suffix | string | `''` | _Optional_. Text to show after string input |
## Example
<CodeTabs>
```yaml
name: title
label: Title
widget: string
```
```js
name: 'title',
label: 'Title',
widget: 'string',
```
</CodeTabs>