Preheat the oven to 350°F. Line a standard 12-cup muffin pan with cupcake liners.
In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
In a large mixing bowl, beat the softened butter and granulated sugar with an electric mixer for 2–3 minutes, or until light and fluffy.
Add the eggs one at a time, beating well after each addition. Mix in the vanilla extract, coconut extract, lime zest, and lime juice.
Add approximately one-third of the flour mixture to the butter mixture and mix on low speed until almost combined.
Add half of the coconut milk and mix gently. Continue alternating the flour mixture and coconut milk, ending with the flour. Mix just until combined.
Fold the shredded coconut into the batter using a spatula. Avoid overmixing.
Divide the batter evenly among the prepared cupcake liners, filling each about two-thirds full.
Bake for 17–20 minutes, or until the tops spring back when lightly touched and a toothpick inserted into the center comes out clean.
Allow the cupcakes to cool in the pan for 5 minutes. Transfer them to a wire rack and let them cool completely before frosting.
For the Lime Buttercream: Place the softened butter in a large mixing bowl. Beat with an electric mixer for 2–3 minutes, or until smooth and creamy.
Add 2 1/2 cups of powdered sugar, the lime juice, lime zest, vanilla, one tablespoon of coconut milk, and a pinch of salt.
Beat on low speed until the ingredients are combined. Increase the speed to medium-high and beat for another 2–3 minutes, or until the frosting is light and fluffy.
Add more powdered sugar if the frosting is too thin. Add additional coconut milk, one teaspoon at a time, if it is too thick.
Spread or pipe the lime buttercream onto the cooled cupcakes.
Garnish each cupcake with toasted coconut, lime zest, and a small lime wedge, if desired.