If I had to do it, i wouldn't try with xhtml, because you wouldn't have eough flexibility. I would program it with the actual Html implementation classes of the components.
Taking the iGoogle example, you would for example create rich:panel's, and put buttons & menus in their headers facets. Then put an actionListener in each button or menu, and set some cookies on the client's computer depending on what he clicks. All the rendering would be decided programatically depending on the existence and contents of these cookies.
If it's not clear enough, i can make you an example.