Add sugar to a saucepan and cook over medium heat until it melts and turns golden brown.
Pour the caramel into a baking dish or individual ramekins and spread evenly.
Whisk eggs, coconut milk, condensed milk, vanilla extract, and salt until smooth.
Strain the custard mixture for a silky texture.
Pour the coconut custard gently over the caramel.
Place the dish in a water bath and bake until the flan is set but slightly jiggly in the center.
Cool completely, refrigerate for several hours, then invert onto a serving plate and garnish with toasted coconut.