Component Not Selectable
You may notice an info icon next to a component in Weaverse Studio’s outline panel. This indicates that Studio cannot locate the component’s DOM element in the preview.
Don’t worry — your component is still fully editable. You can always select it from the outline panel and modify its settings. The info icon simply means Studio can’t highlight or select it by clicking directly on the preview.
Why This Happens
Weaverse Studio identifies components in the preview by looking for adata-wv-id attribute on the DOM element. This attribute is automatically included in the props that Weaverse passes to your component.
There are three common causes for this:
- Props not spread correctly — the
data-wv-idattribute is in the props but never reaches the DOM - Component returns
null— no DOM element is rendered at all, so there’s nothing for Studio to find - Component is conditionally rendered — a parent component controls whether this component appears in the DOM
How to Fix
Cause 1: Props Not Spread Correctly
When your component doesn’t spread the remaining props (...rest) onto its root DOM element, the data-wv-id attribute never reaches the DOM. Studio can see the component exists in the data layer, but it cannot find the corresponding element in the preview.
Destructure your custom props from the rest
Separate your component-specific props and
children from everything else using the spread operator:Spread the remaining props onto the root DOM element
Pass
...rest to the outermost HTML element. This ensures data-wv-id and all other Weaverse-internal attributes reach the DOM:Before & After
forwardRef, the same rule applies — spread ...rest and pass the ref:
With React 19,
forwardRef becomes less necessary. If you spread all props (including ref) onto the root element, Weaverse can detect the DOM element automatically. See the Weaverse Component guide for more details.Cause 2: Component Returns null
If your component conditionally returns null, no DOM element is rendered at all. Without a DOM element, there’s no place for the data-wv-id attribute to exist, and Studio cannot locate or select the component.
This commonly happens when components guard against missing data.
Find the early return
Look for any
return null statements in your component, especially conditional guards at the top:Always render a root element with props spread
Replace the
return null with an empty self-closing element that spreads ...rest:Before & After
Common Patterns That Cause This
Early returns for missing data
Early returns for missing data
Watch out for any conditional return before the root element:Instead, move the condition inside the root element:
Returning null from a ternary
Returning null from a ternary
This is a subtler version of the same problem:
Cause 3: Component Is Conditionally Rendered
Sometimes the component itself is fine, but a parent component decides whether to render it based on some condition. When the condition isfalse, the child component is removed from the DOM entirely, and Studio can’t find it in the preview.
This is standard conditional rendering in React — nothing is broken.
showBanner is false. This is expected behavior — when the parent renders the child again, it becomes selectable in the preview automatically.
Checklist
If a component shows an info icon in Studio, verify:- The component destructures custom props and captures
...rest ...restis spread onto the root DOM element- The component never returns
null— return an empty element with{...rest}instead - If conditionally rendered by a parent — this is expected and safe, no action needed
- The development server has been restarted after changes