Hightlight the text on click and change the value of the text

My initial reaction to this question was “hey, this is exactly what radio buttons are for” and I intended to post a link to them … just to realize that there is no direct support for radio buttons in LVGL.

Anyway, there are places that explain how to build radio buttons from checkboxes (which LVGL has). Like here.

Once you have two checkboxes that logically do what you want you can apply theming to make them look like you want and e.g. highlight the selected one.