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
      • Components
      • Slots
        • Get display name
        • Get Children
        • Prepend
        • Append
      • 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
ElementsElement Types & Methods

Slots (Beta)

Was this page helpful?
Previous

Get display name (Beta)

Next
Built with

The slot instance element represents a slot within a component instance. Slots define areas within a component where instance-level child content can be placed. Each slot accepts only component instances as children, not arbitrary elements.

To get slot instance elements, use element.getSlots() on a ComponentInstance element.

Beta

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

Methods

Currently you can add components as children of slots programmatically but not remove them.

Get display name

Gets the display name of the slot as defined on the component.

Get Children

Gets the component instances currently placed in the slot.

Prepend

Adds a component instance as the first child of the slot.

Append

Adds a component instance as the last child of the slot.

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"SlotInstance"
childrenWhether the element supports the standard children API.booleanfalse
customAttributesWhether the element can have custom attributes.booleanfalse
stylesWhether the element can contain styles.booleanfalse
textContentWhether the element can contain text content.booleanfalse