How do you add custom fields to the right sidebar?

And last one. Is it possible to add custom fields to the right sidebar? We need to be able to craft rules to our components, and I’d do that by doing a special component on the right

Yes - you can render arbitrary custom field UI, by specifying:

props: {
  myProp: {
    type: 'custom',
    component: SomeReactComponent
  }
}

Oh that’s just what I need. thank you!

Hi @yang, I received an e-mail from you asking whether I had a question (don’t know if it was automatic or not) but haven’t answered since I asked things here.

But one other question. Is it possible to add those custom fields in the ui, for components created within plasmic?

image.png

Hmm, what are you thinking of here? You can add custom UIs for code components, but that’s because you are also writing code that knows what to do with that input. But designs created in Plasmic typically don’t have any logic/behavior associated with them.

Two possible other things that may be of interest to you, depending on what you’re looking for:

• You can create code components with custom props, insert them into a Plasmic component, and then right-click the prop to expose (link) it as a prop on the Plasmic component.
• You can create code components that just have a children slot (so you can pass it Plasmic elements) and are basically wrappers that inject behavior into the given elements

You can create code components that just have a children slot (so you can pass it Plasmic elements) and are basically wrappers that inject behavior into the given elements
Oh right, this option works in my case. That’s awesome, thank you!