Select

The Select Field provides a dropdown with one or more options. It uses the Select component from shadcn/ui.

Installation

Included in Headcode CMS Starter, no setup needed.

Usage

productSection.tsx
export const productSection = {  name: 'product',  label: 'Product',  fields: {    size: SelectField({      label: 'Size',      defaultValue: 'm',      options: [        { label: 'Small', value: 's' },        { label: 'Medium', value: 'm' },        { label: 'Large', value: 'l' },      ],    }),  },};