Using a chef’s knife, roughly chop the basil on a cutting board. Add the salt on top of the basil and, using the side of the knife, smash the basil into the salt. Continue to smash and chop until a salty green paste forms.
Rub the lime around the rim of two rocks or margarita glasses. Flip the glasses upside down and dip into the basil salt, turning to coat. Use your fingers to gently press the salt in, if necessary. Fill glasses with ice.
In a cocktail shaker, combine tequila, cucumber juice, elderflower liqueur, and lime juice. Fill shaker with ice, cover, and shake vigorously until very cold. Strain into the prepared glasses and garnish with a lime wedge and a herb sprig. Serve immediately.