You can use a RadioButtonGroup with two radio buttons: left and right .
Perhaps arrange horizontally so that the buttons themselves will be on the left and the right:
Add an onChange() event handler to the RadioGroupButton like this to get your choice:

export function radioGroup1_change(event, $w) {
//Add your code for this event here:
let sel = $w("#radioGroup1").selectedIndex;
console.log("change " + sel);
if(sel === "left") {
$w("#leftHtmlComponent").show();
$w("#rightHtmlComponent").hide();
}
else {
$w("#rightHtmlComponent").show();
$w("#leftHtmlComponent").hide();
}
}
Basically, you could use a Switch component since it’s designed for a binary choice: on/off, left/right. You would just need to add labels (text) to each side of the Switch to inform the user of your intentions. You would then use an onChange() event handler for the Switch and use the two possible answers of a switch to be left and right.
I hope this helps,
Yisrael

