The Messenger of Allah ﷺ said, "Whoever shows off, Allah will expose him, and whoever seeks to be heard of, Allah will make his intentions known."
حدثنا هارون بن إسحق حدثني محمد بن عبد الوهاب عن سفيان عن سلمة بن كهيل
قال رسول الله ﷺ من يراء يراء الله به ومن يسمع يسمع الله به
No references are available.
Sourcing, Bukhari narrated it in the Book of Softening of Hearts, Chapter on Showing Off and Seeking Reputation, no. 6499, and Muslim in the Book of Asceticism, Chapter on the Prohibition of Showing Off, no. 2987, from the hadith of Sufyan Thawri through this chain. It was also narrated by Abdullah bin Abbas (Muslim) and Abu Bakrah (Ahmad, 5/45) with similar wording.