How can I move cabinet next to each other depending on the width?

You must post code when you ask for help :bangbang: