(Nawawi: (n: with commentary by Muhammad Shirbini Khatib)) It is not prohibited t dance ((Shirbini: ) which is not unlawful because it is only motions made while standing or bowing. Furani and others have expressly stated that neither is it offensive, but rather it is permissible, as is attested to by the hadith related in the Sahihs of Bukhari and Muslim that the Prophet(Allah bless him and give him peace) stood before A’isha (Allah be well pleased with her) to screen her from view so that she could observe the Abyssinians sporting and dancing)- unless it is languid, like the movements of the effeminate(Mughni al-muhtaj ila ma’rifa ma’ani alfaz al Minhaj(y73), 4.430).
(‘Umdat Al-Salik(Reliance of the Traveller), page 776)
The great Islamic jurist Sheikh al-Islam ibn Abdul Salam himself used to attend gatherings of raqs or dancing as narrated by Ibn Hajar al-Haytami in fatawa hadithiyya saying that he(Ibn Abdul Salam),
“attended the sama’ and danced in states of ecstasy”
It’s also narrated by Al-Dhahabi in his Siyar 17:33 and others.
Imam Al-Suyuti says,
“How can one condemn making dhikr while standing, or standing while making dhikr, when Allah Most High says, “….those who invoke Allah standing, sitting, and upon their sides….” [ Koran 3:191 ]. And ‘A’isha [ Allah be well pleased with her ] said, “The Prophet [ Allah bless him and give him peace ] used to invoke Allah at all of his times” [ Sahih Muslim, 1.282: 373 ]. And if dancing is added to this standing, it may not be condemned, as it is of the joy of spiritual vision and ecstasy, and the hadith exists [ in many sources, such as Musnad al-Imam Ahmad, 1.108, with a sound / hasan chain of transmission ] that Ja’far ibn Abi Talib danced in front of the Prophet [ Allah bless him and give him peace ] when the Prophet told him, “You resemble me in looks and in character” dancing from the happiness he felt from being thus addressed, and the Prophet did not condemn him for doing so, this being a basis for the legal acceptability of the Sufis dancing from the joys of the ecstasies they experience.”
(Imam Jalal al-Din Suyuti, al-Hawi li al-fatawi. 2 vols. Cairo 1352 / 1933-34. Reprint. Beirut: Dar al-Kutub al-‘Ilmiyya, 1403 / 1983, 2.234)