Preheat oven to 350°F and line a 12 cup muffin pan with paper liners.
In a medium bowl, whisk together flour, baking powder, and salt. Set aside.
In a large mixing bowl, beat softened butter and sugar on medium speed for 2 to 3 minutes until pale and fluffy.
Add eggs one at a time, beating well after each. Mix in vanilla, lime juice, lime zest, tequila, and triple sec until combined. Mixture may look curdled.
With mixer on low, add dry ingredients in three additions alternating with milk, starting and ending with flour. Mix just until no streaks remain. Do not overmix.
Divide batter evenly among liners, filling each two thirds full. Bake for 16 to 18 minutes, until toothpick comes out clean.
Cool in pan for 5 minutes, then transfer to wire rack to cool completely before frosting, about 30 minutes.
For frosting, beat softened butter until smooth. Gradually add powdered sugar one cup at a time, beating well after each addition. Mix in lime juice, lime zest, and pinch of salt until fluffy.
Spread margarita salt onto a shallow plate. After frosting each cupcake, lightly press the outer edge of the frosting into the salt to rim it.
Pipe or spread buttercream onto each cooled cupcake. Top with lime wedge or zest twist for garnish. Serve immediately or store as directed.