<<He was asked, may Allah benefit [us] with him,
about the 'dancing' (raqs) of Sufis during their
emotional states (tawajud), does it have a legal
basis (asl)? He replied: Yes, it does have a
legal basis, it was certainly narrated in the hadith
that Jaafar b. Abi Talib, Allah be well-pleased with
him, 'danced' right in front of the Prophet, upon him
blessings and peace [Musnad Ahmad and Sahih
Ibn Hibban] due to the pleasure he experienced at
hearing the Prophet address him [with the words 'You
resemble me physically and morally']. It is certainly
authentically narrated that a number of major imams
stood up and 'danced' in the gatherings of remembrance
of Allah, among them Shaykh al-Islam `Izz al-Din Ibn `Abd
al-Salam.>>
Ibn Hajar al-Haytami, Fatawa Hadithiyya, Cairo:
Mustafa Babi al-Halabi, 2nd ed. (p. 298).
He said something similar in a longer response in his
Fatawa al-Kubra al-Fiqhiyya (4:355), also allowing
the daff even inside the mosque.
Was-Salam,
GF Haddad