A search for the electroweak production of charginos, neutralinos and sleptons decaying to
final states involving two or three electrons or muons is presented.
The analysis is based on $36.1~\mathrm{fb}^{-1}$
of $\sqrt{s}=13$~TeV proton-proton collisions recorded by the ATLAS detector at the Large
Hadron Collider. No significant deviations from the Standard Model expectation are observed
and results are interpreted in a range of scenarios based on simplified models. Considered
scenarios include the associated production of mass-degenerate next-to-lightest neutralino
and lightest chargino, followed by their decays to final-state leptons and lightest neutralinos
via either sleptons or Standard Model gauge bosons; direct production of chargino pairs,
which in turn decay to leptons and lightest neutralinos via intermediate sleptons; and slepton
pair production, where each slepton decays directly to the lightest neutralino and a lepton.
Stringent limits at 95\% confidence level are placed on the masses of relevant supersymmetric
particles in each of these scenarios.