Preheat the oven to 350°F (175°C) and line a 12-cup muffin pan with paper liners.
In a large mixing bowl, whisk together the all-purpose flour, granulated sugar, baking powder, baking soda, and salt until well combined.
In another bowl, mix the canned coconut milk, melted coconut oil, apple cider vinegar, vanilla extract, and coconut extract (if using). Stir until the mixture is smooth.
Pour the wet ingredients into the dry ingredients and mix until just combined. Avoid overmixing to ensure a light texture.
Fold in the shredded coconut gently, making sure it’s evenly distributed throughout the batter.
Divide the batter evenly among the prepared muffin cups, filling each about two-thirds full.
Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean. Allow the cupcakes to cool in the pan for 5 minutes before transferring them to a wire rack to cool completely.
While the cupcakes are cooling, prepare the frosting. In a medium bowl, beat together the softened vegan butter and powdered sugar until creamy.
Add the coconut milk and vanilla extract, then mix until the frosting is smooth and fluffy.
Once the cupcakes are completely cool, frost them generously with the coconut frosting and sprinkle additional shredded coconut on top if desired.