Radio Group Field
A labeled fieldset of radio options with description and helper or error text.
Show codeHide code
Installation
import {
RadioGroupField,
RadioGroupFieldOption,
} from "@makeplane/propel/components/radio-group-field";Usage
import {
RadioGroupField,
RadioGroupFieldOption,
} from "@makeplane/propel/components/radio-group-field";
export default function BasicDemo() {
return (
<RadioGroupField
name="priority"
label="Priority"
description="Pick one default priority."
density="comfortable"
size="lg"
defaultValue="medium"
hint="You can change this later."
>
<RadioGroupFieldOption value="low" label="Low" />
<RadioGroupFieldOption value="medium" label="Medium" description="Recommended." />
<RadioGroupFieldOption value="high" label="High" />
</RadioGroupField>
);
}Examples
Sizes
Legend, description, and option text scale together across lg, xl, and 2xl.
Show codeHide code
Densities
density sets the row spacing between options: comfortable keeps a gap, compact stacks them flush.
Show codeHide code
Orientations
orientation controls only the option rows. It defaults to vertical; horizontal lays the
options out in a wrapping row while the legend, description, and helper or error text keep their
normal vertical placement.
Show codeHide code
Error
Setting error marks the fieldset invalid and replaces the helper text with the error message.
Every option in the group picks up the invalid state, but only the still-unanswered ones recolor
to danger — an option the user already picked keeps its normal accent color rather than also
reading as wrong.
Show codeHide code
Controlled
Show codeHide code
API Reference
RadioGroupField
Ready-to-use radio group field with legend, description, and helper/error text.
RadioGroupFieldOption
A radio option row for use inside RadioGroupField or a custom RadioGroup.