Star Bit did not originate from fanon, and the information on this page may not be entirely accurate to their canon. You may read more about this subject in the context of their canon on the following wiki(s):
Star Bits can be shot at enemies to stun or defeat them but this will deduct from the player's Star Bit total. They also cannot be recovered if fired. In return, using the Star Spin to defeat enemies tends to cause them to drop Star Bits instead of coins.
Star Bits are based on 金平糖 konpeitō, a multicolored Japanese sugar candy. The confectionery has inspired other aspects of Nintendo-published series, such as Gratitude Crystals in The Legend of Zelda and Minior in Pokémon.