Abstract Different ideological groups within a heterogeneous online social networks not only disagree but also dislike and distrust each other. This phenomenon, called affective polarization, widens political divisions and also impacts how information spreads online. We directly measure affective polarization on social media by quantifying emotions and toxicity of reply interactions. We demonstrate that interactions between users with same ideology (in-group replies) tend to be positive, while interactions between opposite-ideology users (out-group replies) are characterized by negativity and toxicity. Second, we show that affective polarization generalizes beyond the in-group/out-group dichotomy and can be considered a structural property of social networks: emotions vary with network distance between users, with closer interactions eliciting positive emotions and more distant interactions leading to higher anger, disgust, and toxicity. Finally, we show that similar information can exhibit different dynamics when spreading in polarized groups. These findings are consistent across diverse discussions on topics such as the COVID-19 pandemic and abortion. Our research provides new insights into the complex social dynamics of affective polarization in the digital age and its implications for online discourse.