You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
page_title: How to Style the RadioGroup to Look Like a ButtonGroup
6
6
slug: radiogroup-kb-like-buttongroup
7
7
position:
8
-
tags: radiogroup, button, buttongroup
8
+
tags: radiogroup, button, buttongroup, styles
9
9
ticketid: 1547117
10
10
res_type: kb
11
11
---
@@ -29,15 +29,20 @@ How to implement RadioGroup behavior, but style the label and radio input pairs
29
29
30
30
Use custom CSS to make the radio inputs invisible and style their labels to look like buttons.
31
31
32
-
The RadioGroup will look the same as a [ButtonGroup with single selection]({%slug buttongroup-selection%}#single-selection). The major difference is that the RadioGroup has a single value of `<T>`, while each button in the ButtonGroup is bound to a separate `boolean` value for its selected state.
32
+
The RadioGroup will look similar to a [ButtonGroup with single selection]({%slug buttongroup-selection%}#single-selection). The major difference is that the RadioGroup has a single value of type`<T>`, while each button in the ButtonGroup is bound to a separate `boolean` value for its selected state.
33
33
34
-
>caption Style the RadioGroup Like a ButtonGroup
34
+
>tip The following example is for versions 6.0 and above, which feature an [updated HTML rendering for the RadioGroup]({%slug changes-in-6-0-0%}#radiogroup). If you are using an older version, use the [alternative CSS code from the section below](#solution-up-to-version-511).
35
+
36
+
>caption Style the RadioGroup like a ButtonGroup
35
37
36
38
````CSHTML
37
-
<h1>RadioGroup like a ButtonGroup</h1>
39
+
<h1 style="font-size:1.5rem;">RadioGroup like a ButtonGroup</h1>
0 commit comments