مَنْ صَلَّى يُرَائِي؛ فَقَدْ أَشْرَكَ، وَمَنْ صَامَ يُرَائِي؛ فَقَدْ أَشْرَكَ، وَمَنْ تَصَدَّقَ يُرَائِي؛ فَقَدْ أَشْرَكَ
Whoever prays to be seen by people has fallen into a grave form of associating others in worship; likewise whoever fasts or gives charity for show.
Source: أحمد
يُرَائِي comes from the root ر أ ي in Form III and means to perform an act so that people notice and admire it. The report lists صَلَّى (prayed), صَامَ (fasted), and تَصَدَّقَ (gave charity). The same stern warning فَقَدْ أَشْرَكَ follows each action.
Showing off in worship diverts one's aim from pleasing Allah toward winning human approval, damaging sincerity. The report is an occasion to examine one's own motives. We cannot simply pronounce final judgments about other people's inner intentions, which we do not know.