  We study the existence and variational characterization of steady states in a
coupled system of Gross--Pitaevskii equations modeling two-component
Bose-Einstein condensates with the magnetic field trapping. The limit with no
trapping has been the subject of recent works where domain walls have been
constructed and several properties, including their orbital stability have been
derived. Here we focus on the full model with the harmonic trapping potential
and characterize minimizers according to the value of the coupling parameter
$\gamma$. We first establish a rigorous connection between the two problems in
the Thomas-Fermi limit via $\Gamma$-convergence. Then, we identify the ranges
of $\gamma$ for which either the symmetric states $(\gamma < 1)$ or the
uncoupled states $(\gamma > 1)$ are minimizers. Domain walls arise as
minimizers in a subspace of the energy space with a certain symmetry for some
$\gamma > 1$. We study bifurcation of the domain walls and furthermore give
numerical illustrations of our results.
