Hello!
What you want to do is called a treemap structure.
There are some opensource libraries in order to do this in browser, including Google Chart library.
As I understand you want to have a kind of widget on your website, populated with some data.
Could you please tell me what kind of data do you want to show and what kind of features would you like to have?
Best wishes,
Alex