The custom element, also known as the DOM Element, is a placeholder element that you can add any HTML custom attribute, tag, or text to — thereby “creating” that element on the canvas. This is useful for adding HTML elements to the canvas that aren’t available as native Webflow elements.

Once you add the custom element to the canvas, you’re able to use the below methods, which are only available to the DOM element, as well as the more general element methods to manage children, styles, and text content.

Methods

The DOM Element supports the following specific methods:

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”DOM”
stylesIndicates whether the element can contain styles.booleantrue
childrenIndicates whether an element can contain child elements.booleantrue
textContentIndicates whether an element can contain text content.booleantrue
customAttributesIndicates whether an element can contain custom attributes.booleanfalse
Built with