Checkbox

The Checkbox Field represents a boolean (true/false) value.

It uses the Checkbox from shadcn/ui.

Installation

Included in Headcode CMS Starter, no setup needed.

Usage

settings.tsx
export const settingsSection = {  name: 'settings',  label: 'Settings',  fields: {    showBanner: CheckboxField({      label: 'Show banner on homepage',    }),  },};

Options

checkbox.tsx
CheckboxField({  label: 'Visible',  defaultValue: true,});