Data Types and Input Types
dataType and inputType are related but different:
dataType: storage/data semantics.inputType: form UI component used in Studio.
Supported dataType Values
stringintfloatbigintbooleaniddatedatetimetimedurationpointcartesianpointasset
Built-in inputType Values
texttextareanumberselectswitchdatetimerelationshipasseteditor
inputType is one of the built-in values above. The Studio UI is not extended from the config, so there are no custom input types: an unknown inputType string renders the built-in text field (with a console warning), and an unknown previewType string falls back to the built-in text preview.
Built-in previewType Values
previewType chooses how a value renders in lists. When omitted, it follows the inputType.
text,textarea,number,date,datetime,editor,select,relationship,boolean,switchrating: filled stars for a numeric attribute.options.maxsets the star count (default 5); values are rounded and clamped, and empty values render nothing.
{
name: 'rating',
label: 'Rating',
scope: 'global',
dataType: 'int',
inputType: 'number',
previewType: 'rating',
options: { min: 1, max: 5 },
validation: (z) => z.number().int().min(1).max(5),
}Input Type Reference
text
- Typical
dataType:string,id - Options:
comment,size,placeholder
textarea
- Typical
dataType:string - Options:
comment,size,placeholder
number
- Typical
dataType:int,float,bigint - Options:
comment,size,placeholder,min,max
select
- Typical
dataType:string, sometimesint - Options:
list: { label; value }[] | { groupLabel; items }[]comment,size,placeholder
switch
- Typical
dataType:boolean - Options:
comment,size,placeholder
datetime
- Typical
dataType:date,datetime,time - Options:
comment,size,placeholder,format
relationship
- Typical
dataType: usuallystringwith relationship metadata - Requires
relationship: { entity, mode, field } - Supports
singleandmultipleconnections - Supports ordered asset galleries with
relationship: { mode: 'multiple', entity: '_asset', field: 'originalFilename' }
asset
- Typical
dataType:asset - Options:
comment,size,placeholder,accept - Supports upload workflows and file/image metadata
editor
- Typical
dataType:string - Stores rich content as JSON string
Common Patterns
// Boolean switch
{
name: 'isActive',
label: 'Active',
scope: 'global',
dataType: 'boolean',
inputType: 'switch',
defaultValue: false,
}
// Numeric amount
{
name: 'amount',
label: 'Amount',
scope: 'global',
dataType: 'float',
inputType: 'number',
options: { min: 0, max: 1000000 },
defaultValue: 0,
}Important Notes
- Unknown
inputTypevalues render thetextfield in the Studio form. UnknownpreviewTypevalues fall back to thetextpreview in lists. selectcan cast values based ondataType(for example integer values).- For scoped entities, fields can inherit defaults via the “Use default value” behavior.
Last updated on