Skip to Main Content
Builder.io Ideas
Created by Elias Baldwin
Created on Aug 7, 2024

Disable "Link URL" field on Custom Components via code config

Right now, when creating a new custom component and registering it with Builder, the field "Link URL" will always show up in the editor, allowing content editors to wrap the whole component in a link to an arbitrary URL.

It's possible to disable the "Link URL" feature globally in the Space settings; however, this means that it's then impossible to use the feature at all, which eliminates a lot of the flexibility that the Builder editor enables for its out-of-the-box components.

As noted in this issue in the forum https://forum.builder.io/t/disable-link-url-data-field-for-a-custom-component/3172, it's possible to achieve this via a workaround of setting noWrap: true when registering a component. However, this has a large downside of requiring changes to the React (or other framework) component itself to pass through Builder attributes and CSS class names.

It would be much better to have an explicit option (like one of these https://www.builder.io/c/docs/custom-components-setup#setting-component-options) named something like disableLinkUrl: true when registering the component.


  • Attach files