Details with wrapped Summary

I used the Details Component of Vaadin 24, However, seems the summary part does not wrap, ofcourse this shows in mobile as the view gets wider than the screen. Any help, highly appreciated.

  white-space: wrap;

in Java?

There is no API for this, you need to do it in css