Introduction
Core Concepts
Querying Content
Editing
Customizing Tina
Going To Production
Drafts
Guides
Further Reference
Table of Contents

number type

type NumberField = {
label: string
name: string
type: 'number'
/** See https://tina.io/docs/extending-tina/overview/ for customizing the UI **/
list?: boolean
ui?: {
label?: string
description?: string
component?: FC<any> | string | null
parse?: (value: number | number[], name: string, field: F) => any
format?: (value: number | number[], name: string, field: F) => any
validate?(
// number or number[] depends on list true or false
value: number | number[],
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: 'number',
name: 'count',
label: 'Count'
}

Last Edited: July 27, 2021