> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Set Text

> Sets the text value on a String element, overwriting any prior text value.

## `element.setText(text)`

Sets the text value on a String element, overwriting any prior text value.

## Syntax

```typescript
element.setText(text: string): Promise<null>
```

## Parameters

* text: `string` - The new text for your `StringElement`

## Returns

**Promise\<`null`>**

A Promise that resolves to `null`.

## Example

```typescript
// Get all elements and find the first StringElement
const allElements = await webflow.getAllElements();
const foundElement = allElements.find(el => el.type === "String");

if (foundElement) {
    // Check that element has the method in order to use it
    if ('setText' in foundElement) {
        const elementText = foundElement.setText("Hello Element 🚀"); // Set Text
    }
} else {
    console.log('Element not found on page');
}
```

## Designer Ability

| Designer Ability | Locale | Branch | Workflow | Sitemode |
| :--------------- | :----- | :----- | :------- | :------- |
| **canEdit**      | Any    | Any    | Canvas   | Any      |

```
```