Radios

Loading "Radios"
πŸ‘¨β€πŸ’Ό We need to allow the user to select the visibility of the account. It can be either Public or Private. We could use a <select> here, but I don't think that's the best option. Instead, let's use a radio group.
What's interesting about radio groups is that they are a group of inputs that share the same name. Only one of them can be selected at a time. Each radio input needs its own label. To label the entire group, you can use a <fieldset> and a <legend>.
Similar to checkboxes, to set the default value, you need to add the checked attribute to the input you want to be selected by default.
Similar to a select option, you need to set the value on the input to determine what value will be sent to the server when the form is submitted.
Login to get access to the exclusive discord channel.
  • βš›οΈFundamentals
    First Four Exercises are Free!
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    To make sure this shows up in the fundamentals thread. Isn't it exciting the first four exercises of...
    1 Β· 4 days ago
  • General
    Welcome to EpicReact.dev! Say Hello πŸ‘‹
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    Welcome to the first of many posts in the EpicReact.dev channel! Take a moment to introduce yourself...
    0 Β· 4 days ago