From the Super Mario Wiki
The Fruit Frame is a special game mechanic in Yoshi's Story. As its name suggests, the Fruit Frame frames the action on screen. Specifically, the Fruit Frame displays the fruit the Baby Yoshis have eaten on the current stage. The fruit are displayed in order of their collection, starting with the first fruit in the upper-left corner next to the Smile Meter, then circling clockwise with each subsequent fruit around the screen. The Fruit Frame is used to keep track of the kind and number of fruit the Yoshis have eaten, as thirty fruit must be eaten in order to complete any stage in Yoshi's Island, and thirty melons must be eaten in order to receive a perfect score for any stage. White dots are used as placeholders until all thirty fruit are collected. The frame can be turned off and on by pressing the Button and adjusted by using the .