Custom elements are web components that let you add custom HTML, CSS, and JavaScript to extend your site's functionality beyond the built-in editor. They follow the Web Components standard and can integrate with any JavaScript ES6 library or framework that follows HTML5 standards.
You may want to use custom elements in the following scenarios:
The following steps describe the general flow for working with custom elements:
You can host custom elements on Wix or an external server.
Note: You can use third-party custom elements so long as you have their server URL and tag name.
SEO for custom elements is handled through Velo code by defining seoMarkup
.
This approach applies to both Wix-hosted and externally-hosted elements. Without proper SEO markup, only JavaScript-enabled crawlers, like Google, will index the content.
Caution: To avoid issues like cloaking, ensure that the content in your custom element matches the defined SEO markup.
If you're experiencing issues with custom elements, consider the following potential causes: