Is there a way to use a surface material for UI Widget?

So I’m animation this material where it’s a wipe and transition between 2 textures it works perfectly fine when in the Surface Material Domain but when I switch it to user interface it doesn’t do it at all. So i’m wondering is there away to use a Surface Material for a UI widget?