According to the director Pete Docter, each emotion is based on a shape: Joy is based on a star, Sadness is a teardrop, Anger is a fire brick, Fear is a raw nerve, and Disgust is broccoli. He noted that he likes broccoli very much, however.
Some memory balls in Riley's mind contain scenes from other Pixar movies, such as Carl and Ellie's wedding in Up (2009).
"Yeast of Edin" is based on a bakery near Pixar Studios. It only serves one kind of pizza daily, and broccoli is one of the toppings.
The writers considered up to 27 emotions but settled on five (Joy, Sadness, Disgust, Fear, and Anger) to make it less complicated. Some primary emotions that were cut included Surprise, Pride, and Trust.
PIXAR invited Paul Ekman, an American psychologist who is a pioneer in studying emotions and their relation to facial expressions, to brief the crew on the nature of emotions.