I'm creating a form in Blazor and I like to have a segment like the following example
Using Bootstrap, I have this code for that
<div class="btn-group" role="group" aria-label="Basic radio toggle button group"><input type="radio" id="btnradio1-@Id" class="btn-check" name="btnradio1-@Id" autocomplete="off" checked @bind-value="Value"><label class="form-label btn btn-outline-primary" for="btnradio1-@Id"> Yes</label><input type="radio" id="btnradio2-@Id" class="btn-check" name="btnradio2-@Id" autocomplete="off" @bind-value="Value"><label class="form-label btn btn-outline-primary" for="btnradio2-@Id"> No</label><input type="radio" id="btnradio3-@Id" class="btn-check" name="btnradio3-@Id" autocomplete="off" @bind-value="Value"><label class="form-label btn btn-outline-primary" for="btnradio3-@Id"> Sometimes</label></div>and in the code, I have this parameter:
[Parameter] public string Id { get; set; } = Guid.NewGuid().ToString();[Parameter] public string? Value { get; set; }When I click on an input, I want to change the Value with the correspond value of the input I clicked. For example, if I click on No, I want that the Value is No.
