Swap components?

I’ve created a bunch of buttons with different types (primary, secondary etc) as components. They’re created in the same component page and then exported as components. They also have a set of parameters on them - love it! Unfortunately it seems that, after adding them to a page, I cannot swap for example the primary button component with the secondary? I need to add a new button component from the add element list. Or is it a way of actually swapping them?

Hello @jonasdbj,

Thank you for the inquiry.

There is no option to swap or convert an exported component. Have you tried deleting the current component and inserting another from the Element Library? If you can provide a screenshot, we might better understand what you’re trying to do.

Best regards,
Ismael

Thanks for quick reply. Yes that’s what i’m doing right now. Deleting and inserting another one from the element library. However that’s a pain once again setting new parameters on it, for example link, button text etc. I realize that the components swapping should contain the same parameters. Would be a nice feature request :slight_smile:

Thank you for the update. You might be referring to Gutenberg’s block transform feature. This option is not available in the builder.

https://developer.wordpress.org/block-editor/reference-guides/block-api/block-transforms/
https://gutenberg.10up.com/reference/Blocks/block-transforms/