Radio Group

The Radio Group Field allows selecting one value from multiple options. It uses the Radio Group component from shadcn/ui.

Installation

Included in Headcode CMS Starter, no setup needed.

Usage

styleSection.tsx
export const styleSection = {  name: 'style',  label: 'Styling Options',  fields: {    alignment: RadioGroupField({      label: 'Alignment',      defaultValue: 'center',      options: [        { label: 'Left', value: 'left' },        { label: 'Center', value: 'center' },        { label: 'Right', value: 'right' },      ],    }),  },};