The present invention provides a composition containing component (A): a compound represented by the formula (1) wherein each symbol is as described in the DESCRIPTION, or a salt thereof, and component (B): at least one kind of surfactant selected from the group consisting of an anionic surfactant having a carboxyl group, an amphoteric surfactant and a nonionic surfactant, which is superior in foamability and foam volume and affording improved rinsing performance and smooth feeling after drying.