In a large bowl, or mixing bowl, add the room temperature ¼ cup butter and ⅓ cup sugar (half of the sugar). Cream both together until combined.
Add ½ tsp coconut extract and ½ tsp vanilla extract and mix until combined.
In a medium bowl, add 1 ¼ cup gluten free flour or cake flour, 2 tsp baking powder, and ¼ tsp salt. Add ⅓ of the dry ingredients and whisk them into the butter mixture. It will be pretty lumpy. This recipe can be made with either gluten free 1:1 ratio flour or cake flour is what my mom always used!
Then add ½ of the milk and whisk in to combine. Repeat with another ⅓ of the flour mixture followed by the milk until both are gone.
In a separate bowl, with a hand mixer or stand mixing bowl, whip 2 egg whites on medium speed until frothy. Very slowly sprinkle in the other half of the ⅓ cup of sugar while the eggs are whipping. When all the sugar has been added, turn the mixer on medium high and whip until medium peaks form.
Add the meringue to the bowl of the wet ingredients batter and fold to combine.
Line a muffin or cupcake tin with cupcake liners. Divide batter into each liner, filling them about ¾ full.
Place the tin on the middle rack of the oven and bake at 350 for 20-22 minutes, or until the top springs back when touched.
Remove the cupcakes from the oven and allow to cool completely on a wire rack.
Fill a piping bag with the coconut buttercream frosting. Pipe with desired tip on top of each coconut cupcake. Sprinkle with extra coconut shreds on top of the frosting.