Adding complex Chakra UI prop type examples in Plasmic

How do I add these Chakra UI prop type example when registering a component in Plasmic :
() => void
MotionPreset
Pick< PortalProps, "appendToParentPortal" | "containerRef" >
ScrollBehavior
"clippingParents" | "scrollParent" | HTMLElement
ResponsiveValue<string | number | (string & {})>
ReactElement<any, string | JSXElementConstructor<any>>
...

I see them in the Chakra Docs Prop pages, and can do the simple ones like String, boolean, number , choice… but these more complex once stump me.
Do I need to look into https://docs.plasmic.app/learn/custom-controls/ ?

Hi

() => void I believe you can register as a event handler https://docs.plasmic.app/learn/code-components-ref/#eventhandler you can also specify the args that you need, then in studio you just use the interactions builder to set the value of it

MotionPreset this is not a default typescript type, so you need to understand better it to be able to register it.

Pick< PortalProps, "appendToParentPortal" | "containerRef" > this is only the fields appendToParentPortal and containerRef or PortalProps, containerRef it’s not possible to register currently I believe.

ScrollBehavior is type ScrollBehavior = "auto" | "instant" | "smooth"; so you register as option.

"clippingParents" | "scrollParent" | HTMLElement the HTMLElement shouldn’t be supported either.

ResponsiveValue<string | number | (string & {})> this one does feel like something it would be some kind of custom control.

ReactElement<any, string | JSXElementConstructor<any>> what is the case of this one ? It looks like it could be a slot.

One thing about code components registration is that you don’t need to register everything to be able to use the component in the studio, you can register only what you need, also you don’t need to register a 1-1 correspondence between the props, you can change how the props are registered to better suit your needs or to be of simpler usage in the studio.

OK so how do you use a code component without registering it?

Sorry, I meant that if some props are not going to be used or if you are going to be using it in a specific way, you can choose to not register or register in another way

Oh yes - I see .