The order parameter of superconducting pairs penetrating an inhomogeneous magnetic material can acquire a long range triplet component (LRTC) with non-zero spin projection. This state has been predicted and generated recently in proximity systems and Josephson junctions. We show using an analytically derived domain wall of an exchange spring how the LRTC emerges and can be tuned with the twisting of the magnetization. We also introduce a new kind of Josephson current reversal, the triplet $0-pi$ transition, that can be observed in one and the same system either by tuning the domain wall or by varying temperature.