In a blender or mixing cup, combine the ube halaya, coconut milk, condensed milk, and ube extract. Whisk or blend until completely smooth and the mixture is a uniform purple color.
Fill a tall glass with ice cubes, leaving about an inch of space at the top.
Pour the ube coconut mixture over the ice, filling the glass about three-quarters full.
Slowly pour the espresso or cooled strong coffee over the back of a spoon held just above the drink, allowing it to cascade over the top and create layers.
Garnish with toasted coconut flakes and serve immediately with a straw, stirring before drinking to combine all the flavors.