Sounds like you’re looking to create a Pluggable Widget:
How to: https://docs.mendix.com/howto/extensibility/create-a-pluggable-widget-one
Learning path: https://academy.mendix.com/link/path/108/Build-a-Pluggable-Widget