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

37 lines
775 B
Plaintext
Raw Normal View History

2022-09-30 11:39:35 -04:00
---
group: Widgets
title: String
weight: 24
2022-09-30 11:39:35 -04:00
---
- **Name:** `string`
2022-11-02 15:42:21 -04:00
- **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>
2022-11-02 15:42:21 -04:00
```yaml
name: title
label: Title
widget: string
```
```js
name: 'title',
label: 'Title',
widget: 'string',
```
</CodeTabs>