Proper antonym for "expand" [closed]

I am creating an application that has a small panel that has an "expand" button. When the user expands it, he will be able to shrink it again.

What would be the best antonym of "expand" to use here?I don't think "shrink" is the most formal one.

I have found "diminish", "compress", "lessen", "narrow" and "shrink" but I'm not 100% which one of these would fit best on my case.

Edit: This has nothing to do with programming. I just mentioned where I'll be using the word, so as to help me find the correct antonym.


Solution 1:

In .Net languages, the standard terminology for the opposite of expand is collapse.

Solution 2:

Reduce Become smaller or less in size, amount, or degree

If when you click on the "button" the panel is still visible but shrunken in size reduce would explain its purpose. It's a perfectly acceptable antonym for expand.

Solution 3:

Contract?? That's my guess. Good luck!

Solution 4:

I agree with user60932 that the most direct contrast with "expand" is "contract", but has a legal connotation, as WS2 points out. ("minimize" suffers from having an altogether different sense in computing contexts: to "minimize" a window - I reckon you don't want that on your button!)

If "contract" is to be avoided, then my inclination would be to go with "shrink". The meaning ought to be common enough from the film title, Honey, I Shrunk the Kids, even if that's "shrunk" rather than "shrink"! It also has the advantage of being unambiguous.

In fact, WordNet gives only "shrink" and "contract" for the meaning "become smaller" and the antonym of "expand", so one of those seems the best bet.