Use a mandoline or sharp knife to slice the onion very thinly.
Add the onions to a shallow bowl and sprinkle the salt and sugar on top, massaging to coat. Squeeze on the lime juice and toss with your hands. Let sit for at least 10 minutes at room temperature, stirring once or twice.
Store leftovers in a sealed jar in the fridge for about 1 week.