Docs

v.Latest
Introduction
Core Concepts
Querying Content
Editing
Customizing Tina
Going To Production
Media
Drafts
Guides
Further Reference

boolean Type

type BooleanField = {
label: string
name: string
type: 'boolean'
list?: boolean
// See https://tina.io/docs/extending-tina/overview/ for customizing the UI
ui?: {
label?: string
description?: string
component?: FC<any> | string | null
parse?: (value: boolean | boolean[], name: string, field: F) => any
format?: (value: boolean | boolean[], name: string, field: F) => any
validate?(
// boolean or boolean[] depends on list true or false
value: boolean | boolean[],
allValues: any,
meta: any,
field: UIField<F, Shape>
): string | undefined | void
}
}

Examples

Tina will generate the appropriate component depending on the configuration provided.

Simple

{
type: 'boolean',
name: 'published',
label: 'Published'
}

Last Edited: September 12, 2024
Table of Contents