React- Giving a toggle switch between Card view and table view of an entity

I want to display both table view and card view for an entity and want to give a toggle switch on the upper right corner to switch between these two views on the same screen. how can I do that?

You can create a standard master-details screen in the project. Try it online here.


I want this using the React Frontend UI generator. I’m adding the screenshot of classic view. I want to add a toggle switch button somewhere in the upper right corner to switch to the Card view of the same entity on the same screen.

Sorry for the late response, see the following example