This section refers to the different controls and settings for player-owned onions, This won't apply to onions you don't own, if you don't know how to get an onion yet refer to the right subsection on the Piklopedia.

§dFlight controls§r

These are the controls relevant for making the onion follow you and how.

-Sit/Stand up the onion: Interact with the onion without sneaking.

-Use the whistle: If is not sitting, make the onion try to fly to your exact position.

§dPikmin Colony Controls (Without Interface)§r

By interacting with the onion with a whistle in hand you can make Pikmin able or not to come out of the onion while is sitting, turning this off while Pikmin are outside will call them back to the onion, for more info check the section about Pikmin colonies.

If you make the onion fly while Pikmin are outside, this will also call them back to the onion to move the whole colony easier, they. come out again once you sit it, if you allow it.

§dPikmin Storage Controls (Without Interface)§r

-Store Pikmin: Drop Pikmin near the onion as an item, they'll find and enter the nearest onion of their color.

-Withdraw Pikmin: Sneak and interact with the onion to withdraw Pikmin 1 at the time.

§dOnion Interface§r

Onions have a small interface for controlling not movement options easier, You access it by punching the onion, and only the player that owns it can access it. 
The menu has 3 simple options I'll explain below, to use the interface just change these 3 values as you need, and press the "Submit" button.

Options:

-Allow Pikmin to come out of the onion on their own (Toggle): This just defines if Pikmin can exit the onion while is sitting, is off by default, and changing this value does the same as interacting with the onion using a whistle, if turned off while Pikmin are outside they also get called back to the onion.

-Deposit/Withdraw Pikmin (Slider): By default set at 0, you can use these sliders to set an amount of Pikmin to deposit from your inventory to the onion or withdraw from the onion to your inventory,  by setting the amount in the right slider.
Is recommended use only one slider at a time, but you can use both if you want without any issue, for example, if you request to deposit 5 Pikmin and withdraw 7, you'll just withdraw 2, if you request to deposit 7 and withdraw 3, you'll just deposit 4. Using both sliders at the same time is possible but just using one is quicker and less complicated.

This interface is there to make things quicker, like taking 100 Pikmin from your onion all at once instead of one by one, but you are free to use the other methods if they are easier for you.