Patent attributes
An online system presents a content item to users and receives selections of reaction icons from the users. The online system generates a background animation with the selected reaction icons and a foreground animation to be layered on top of the background animation. The online system sends the background and foreground animations to a client device to be cached. Further, the online system presents the content item to a viewing user associated with the client device and receives a selection of a reaction icon from the viewing user. The online system selects a subset of the users based on the viewing user's affinity to the users, retrieves images of the selected users, and send the images to the client device. The client device customizes the background and foreground animations based on the images and the viewing user's reaction icon to generate a compound animation for display to the viewing user.