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.
When Pete Docter and Jonas Rivera pitched the film to Mindy Kaling, she was moved to tears and said, "I think it's great that you guys are making a film that shows it's difficult to grow up, and that it's okay to be sad about it." According to Pete Docter, they exclaimed, "Quick! Write that down!"