Hello, Please use below solution.
Form-> OnCreate
procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
with UnimSegmentedButton1, JSInterface do
JSAddListener('painted', JSFunction('a', 'a.getPressedButtons()[0].innerElement.dom.style.backgroundColor= "#00AA00";'));
end;
UnimSegmentedButton -> ClientEvents -> ExtEvents -> toggle
function toggle(sender, button, isPressed, eOpts)
{
if (isPressed){
button.innerElement.dom.style.backgroundColor= '#00AA00';
}
else{
button.innerElement.dom.style.backgroundColor= '';
}
}