Line your baking pan with parchment paper, leaving some overhang for easy removal.
Spread the shredded coconut on a baking sheet and toast in a preheated oven at 180°C (350°F) for about 5 minutes, stirring halfway, until golden and fragrant.
In a saucepan over low heat, gently melt the dark chocolate and butter together, stirring constantly until smooth and glossy.
In a mixing bowl, combine the toasted coconut, sweetened condensed milk, vanilla extract, and a pinch of salt. Mix well until sticky and evenly coated.
Pour the melted chocolate mixture into the coconut bowl and stir thoroughly until everything is well combined and sticky.
Transfer the mixture into your prepared pan, pressing it down firmly with a spatula to create an even layer. This helps the bars hold together neatly.
Optional: sprinkle the remaining toasted coconut or flaky sea salt on top for extra texture and flavor.
Place the pan in the fridge and chill for at least 2 hours, or until the mixture is firm and set.
Once chilled, lift the set mixture out of the pan using the parchment overhang and place on a cutting board.
Use a sharp knife to cut into squares or rectangles, wiping the knife with a warm cloth between cuts for clean edges.
Serve the bars at room temperature, enjoying the glossy chocolate top, crunchy toasted coconut, and chewy coconut interior.