Iridium CMSIridium CMS

bool

The bool property is used to define a boolean value.

Boolean values default to undefined when not set in the admin. Use the defaultValue configuration option to set a default value or set required to true to require a value.


import { atom, bool } from '@iridiumcms/core';

export const sample = atom('sample', {
  myProp: bool(),
});

Configuration

The bool field takes an optional configuration object with the following properties:

  • defaultValueboolean
    The default value of the field. Defaults to undefined.
  • displayNamestring
    The display name of the field. Defaults to the name of the property.
  • requiredboolean
    Whether the field is required. Defaults to false.
  • layoutLAYOUT
    The layout of the field in the admin. Defaults to LAYOUT.full.