Have a glass roof that would have a set of solar cells to charge the battery while in the sun.
While this is technically possible, the power generated is rather minimal. There have been a few production cars that have implemented a solar panel, but mostly for a tiny fan for air circulation while the car is parked in the sun.
We did an in-depth analysis of the competition, costs, and how much range might be gained. The results were not good. Check it out at TeslaTap’s Solar Vehicle Roof Analysis