How to set a RadioGroup item as checked by default? #741
-
Hi! Tried to set the first item as default using both Here's the aforementioned code:
How it's working right now: Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hello, @albertohermosillo You don't need to touch any Just set the i.e. <RadioGroup.Root
++ value="credit-card"
class="flex flex-row gap-2 py-3"> Cheers. |
Beta Was this translation helpful? Give feedback.
Hello, @albertohermosillo
You don't need to touch any
states
/data-*
attributes for this.Just set the
value
prop onRoot
to that of your first item.i.e.
<RadioGroup.Root ++ value="credit-card" class="flex flex-row gap-2 py-3">
Cheers.