For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
      • Element Presets
      • DOM Elements
      • Strings
        • Get Text
        • Set Text
      • Components
      • Slots
      • Headings
      • Images
      • Links
      • Forms
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • Methods
  • Properties
  • Supported Elements
ElementsElement Types & Methods

String Element

Was this page helpful?
Previous

Get Text

Next
Built with

The String element represents text content of an element within the Webflow Designer.

String elements can’t be created directly, and are only created when adding elements that contain text content.

Methods

You can get and set the text value of a string element using the following methods:

Get Text

Retrieves the text value from a String element.

Set Text

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

Properties

PropertyDescriptionTypeExample
idUnique identifier for the element composed of two identifiers, the component and the element.object{component: "64c813...", element: "5edf8e59-71f9..."}
typeSpecifies the type of the element.string’String’
childrenIndicates whether an element can contain child elements.booleanfalse
stylesIndicates if the element can be styled.booleanfalse
textContentIndicates if the element can contain text contentbooleanfalse
customAttributesIndicates whether an element can have custom attributesbooleanfalse

Supported Elements

The following elements contain string elements as children, which can be accessed using the String element methods.

  • DOMElement
  • BlockquoteElement
  • EmphasizedElement
  • HeadingElement
  • LinkElement
  • ParagraphElement
  • SpanElement
  • StrongElement
  • SuperscriptElement
  • SubscriptElement
  • InlineCodeElement
  • CommerceBuyNowButtonElement
  • CommerceCartOpenLinkElement
  • CommerceCartCheckoutButtonElement
  • CommerceCartCloseLinkElement
  • CommerceCartRemoveLinkElement
  • CommerceCartOptionListItemLabelElement
  • CommerceCartOptionListItemValueElement
  • CommerceCartQuickCheckoutButtonElement
  • CommerceCartApplePayButtonElement
  • CommerceCheckoutLabelElement
  • CommerceLabelElement
  • CommerceCheckoutPlaceOrderButtonElement
  • CommerceCheckoutBillingAddressToggleLabelElement
  • CommerceCheckoutOrderItemOptionListItemLabelElement
  • CommerceCheckoutOrderItemOptionListItemValueElement
  • CommerceCheckoutSummaryLabelElement
  • CommerceCheckoutDiscountsButtonElement
  • CommerceCheckoutDiscountsLabelElement
  • DropdownLinkElement
  • LightboxWrapperElement
  • FormBlockLabelElement
  • FormInlineLabelElement
  • NavbarLinkElement
  • TabsLinkElement
  • UserFormBlockLabelElement