The results of a search for direct pair production of top squarks in events with two opposite-charge leptons (electrons or muons) are reported, using 36.1 fb - 1 of integrated luminosity from proton-proton collisions at s = 13 TeV collected by the ATLAS detector at the Large Hadron Collider. To cover a range of mass differences between the top squark t ~ and lighter supersymmetric particles, four possible decay modes of the top squark are targeted with dedicated selections: the decay t ~ → b χ ~ 1 ± into a b-quark and the lightest chargino with χ ~ 1 ± → W χ ~ 1 0 , the decay t ~ → t χ ~ 1 0 into an on-shell top quark and the lightest neutralino, the three-body decay t ~ → b W χ ~ 1 0 and the four-body decay t ~ → b ℓ ν χ ~ 1 0 . No significant excess of events is observed above the Standard Model background for any selection, and limits on top squarks are set as a function of the t ~ and χ ~ 1 0 masses. The results exclude at 95% confidence level t ~ masses up to about 720 GeV, extending the exclusion region of supersymmetric parameter space covered by previous searches.