> 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.

# Get Text Prop Element (Beta)

> Get the text or rich text prop element for a given prop on a component instance.

## `element.getTextPropElement(propId)`

Returns the `TextPropElement` or `RichTextPropElement` that corresponds to a `textContent` or `richText` prop on a component instance. Returns `null` if the prop does not exist or is not a text-based prop.

Text prop elements behave like containers — use their `append()` and `prepend()` methods to insert child elements directly into the prop's content area.

> **Beta**
>
> These methods are in public beta and may change with future releases.

## Syntax

```typescript
element.getTextPropElement(propId: string): Promise<TextPropElement | RichTextPropElement | null>
```

## Parameters

* **propId**: *string* — The ID of the prop. Retrieve prop IDs using [`element.getProps()`](/designer/reference/component-element/getProps) or [`element.searchProps()`](/designer/reference/component-element/searchProps).

## Returns

**Promise\<*TextPropElement* | *RichTextPropElement* | `null`>**

A Promise that resolves to a `TextPropElement` (for `textContent` props) or `RichTextPropElement` (for `richText` props), or `null` if the prop does not exist or is not a text-based prop type.

## Example

```typescript
const elements = await webflow.getAllElements();
const componentInstance = elements.find(el => el.type === 'ComponentInstance');

if (componentInstance?.type === 'ComponentInstance') {
  const props = await componentInstance.getProps();
  const textProp = props.find(p => p.type === 'textContent');

  if (textProp) {
    const propEl = await componentInstance.getTextPropElement(textProp.id);

    if (propEl) {
      const name = await propEl.getDisplayName();
      const children = await propEl.getChildren();
      console.log(`Prop element "${name}" has ${children.length} child(ren)`);
    }
  }
}
```

## Designer Ability

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | Any    | Any    | Any      | Any      |