==Yuhara When There is a Halachic Imperative==
If one is doing a certain practice because one got a certain pesak from one’s rav or because it is to fulfill the basic halacha, it isn’t considered yuhara even if it isn’t the minhag.<ref>The Mordechai (Brachot n. 1) writes that since Rabbenu Tam held that if one said Shema after Plag Hamincha one fulfilled his obligation if one does repeat it later it appears as yuhara. Bet Yosef 235:1 argues that it isn’t yuhara to repeat Shema since according to many rishonim one didn't fulfill one's mitzvah. This is also his opinion in Shulchan Aruch 235:1 and Mishna Brurah 235:15. Maharil (Mezuzah 1) writes that one should put up a mezuzah in every room in one’s house and it isn’t yuhara even though the minhag was to only put up one for the front door, since that minhag is completely incorrect. Geonim responsa emanuel 161 reiterates this point stating that it isn’t yuhara to wear tefillin since it is a mitzvah even though many people fail to do so. </ref> Nonetheless one can only do so with the intent for the mitzvah and not to be [[arrogant]].<ref> Shulchan Aruch Hamidot v. 1 p. 123 explains that it is always forbidden to do something to show off, as that is a Biblical prohibition of having גאוה even while doing a mitzvah. See Shulchan Aruch O.C. 565:6 who writes that someone who publicizes that he keeps voluntary fasts is punished.</ref>
##For example, according to Rav Schachter, it isn’t yuhara to wear [[techelet]] in a place that the minhag is not to because the primary halacha requires it.<ref> Rav Schachter ([[Yuhara_When_There_Is_a_Halachic_Imperative| Halachipedia Article 5780]], Ginat Egoz Siman 2) explained that since wearing techelet is halachically mandated due to [[safek deoritta lchumra]], there is no reason to consider wearing it yuhara.</ref>
==Accepted in a Location==
##If it is accepted in your place that some people do this midat chasidut, then it isn’t considered yuhara.<Ref>Bet Yosef 24:2 cites Rav Neturai Goan that it is yuhara to hold one's tzitzit during kriyat shema since there is no need to do so. The Bet Yosef points out that today there's no yuhara to do this since some people have the minhag to do it. Chida (Chaim Shaal 1) and Shulchan Aruch Hamidot v. 1 p. 128 agree. However, Shvut Yakov 2:44 argues that there is yuhara to wear Rabbenu Tam tefillin even if some people do it unless most do it. Mishna Brurah 34:16 cites the Shvut Yakov. Daat Yisrael 2:211 by R’ Yisrael Schwartz distinguishes between tzitzit which is only a minhag so having some people do it is sufficient, as opposed to Rabbenu Tam tefillin which is a question of actual halacha so only if many people do it is it permitted.