all electric charge produces a magnetic-field, when they are in motion. if a big amount of current flows through a spiral, it generates enough electromagnetic force to attract objects (see electromagnets).
ferrofluid by rozy zhu also uses electromagnets (https://rozi.design/Ferrofluid-Type).