Prepare your cupcake tin by lining it with muffin liners and preheat your oven to 175℃ / 347℉ (no fan).
In a large bowl, cream the room-temperature butter and sugar for a few minutes until it's light and fluffy, then whip in the room temperature eggs one by one, and finally mix in the vanilla extract.
Sift together the flour, baking powder, and salt, then mix in the shredded coconut. This is your dry ingredients. Reduce the mixer speed to low speed and add the dry ingredients in thirds alternating with the room temperature milk. Do not overmix the batter at this point.
In a small bowl, mix vinegar with the baking soda. It will be super bubbly. Then, immediately fold the vinegar mixture into the batter just until it's combined.
Pipe or spoon the batter evenly into the cavities of your cupcake tin, filling each one about ¾ full.
Bake the cupcake for about 20-22 minutes at 175℃ / 347℉ or until a toothpick inserted into the center comes out clean. Do not overbake them, as they can dry out.
Cool the baked cupcakes on a cooling rack. They must be at room temperature before frosting.
Coconut frosting
Combine sugar and flour in a saucepan and cook at medium heat for 2 minutes. Then, slowly add the coconut milk and cook for a further 3-5 minutes until the mixture thickens like a pudding.
Place this paste into a shallow bowl and cover the entire surface with plastic wrap to avoid skin forming on top. Let it come to room temperature.
Then, soften your butter. Buttercream can only be made with the right temperature butter that is neither cold, nor soft or runny.
Prepare a stand mixer with the paddle attachment. Alternatively, use your electric hand mixer.
Cream the room-temperature butter at medium-high speed for 3 minutes until it becomes light in color and fluffy in texture.
Then, add the room temperature paste into the butter in 4 batches, then whip it for another 4 minutes or until the mixture becomes light, fluffy, and increases in volume.
Lastly, add the vanilla extract, salt and shredded coconut and continue whipping for another minute until it is smooth and silky.
For an even stronger coconut flavor, consider adding pure coconut extract made from natural coconut extractives.
Assemble
Transfer the frosting into a piping bag fitted with a nozzle and chill it for 30 minutes before using.
Then, frost the cupcakes one by one, and decorate them according to your liking with shredded coconut, or sprinkles.
The cupcakes are best served fresh. Any leftovers can be stored refrigerated for 2-3 days in an airtight container. Bring them back to room temperature before serving for the frosting to soften.
Notes
Ingredient notes:
Measure your ingredients with a digital scale for accuracy.
All cupcake ingredients must be at room temperature to properly emulsify: eggs, butter, and milk.
Use good quality high fat (82%) butter for making buttercream and cupcakes.
It is key to use high quality vanilla for the best flavor. Feel free to try my homemade vanilla extract.
This frosting already has a medium coconut flavor; however, you can further enhance it with coconut extract. Make sure to only use high-quality pure coconut extract, which has a lovely natural coconut flavor.
Technique notes:
Make sure you read my Expert tips section above to maximize your success. A short recipe alone cannot cover all the necessary details and science behind baking.
The temperature and texture of the butter are key when making this frosting. Wait until it is soft, however, avoid last-minute microwaving.
Do not add the coconut milk flour cooked paste before it reaches room temperature. If it is too hot, it will melt the butter, resulting in a buttercream soup.
Note that the frosting texture is best when the butter is at the right temperature (room temperature) and the mixture is freshly whipped. I like to use the frosting immediately or store it at room temperature in a piping bag for a few hours. If stored in the refrigerator, you will need to bring it back to room temperature before using it and might need to give it another minute or two to whip in the stand mixer to increase the volume again.
Baking these cupcakes takes 22 minutes in my oven. However, you should focus on the texture, not the time. Apply the toothpick test (it should come out clean) to avoid overbaked cupcakes. Do not overbake them, as that will result in a dry texture.