Skip to main content

RadioField

To implement RadioField component into your project you'll need to add the import:

import { RadioField } from "@shoptet/ui";

After adding import into your project you can use it simply like:

<RadioField
name="test"
label="Label"
options={[
{
value: "male",
label: "Male",
tooltip: "Select this if you identify as a male.",
},
{
value: "female",
label: "Female",
},
{
value: "other",
label: "Other",
tooltip: "Select this if you identify as anything else.",
},
]}
getOptionValue={(option) => option.value}
getOptionLabel={(option) => option.label}
data-testid="radio-field"
/>