the default choice group is vertical, how to customize to horizontal choice group?
I believe @srideshpande has worked on ChoiceGroup - Sri, do you know how to go about customizing choicegroup to be horizontal?
adding CSS similar to the following worked for me:
.ms-ChoiceField {
flex: 1;
}
.ms-ChoiceFieldGroup-flexContainer {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
.ms-ChoiceField-wrapper {
min-width: 20em;
}
Seems like this was resolved with @paulmech's comment - thanks Paul!
this example changes all radios on the page.
You might want to create a custom css class for horizontal ones, or if you want to set it to a specific control without using CSS:
<ChoiceGroup selectedKey={valueType}
styles={{ flexContainer: { display: "flex" } }} options={[
{ key: 'specific', text: 'selected\u00A0\u00A0' },
{ key: 'relative', text: 'relative' }]} />
done!
Most helpful comment
adding CSS similar to the following worked for me: