Add panels in Dialog2 atlassian ui in Server

The older dialog allowed you to create panels. However Dialog2 does not give any such functionality. Im upgrading my dialog instances to dialog2 and would need the panels functionality.
Dialog 1 API - Dialog - AUI Documentation
Dialog 2 API - Dialog2 - AUI Documentation
Can someone help me out how I can do it?