Skip to Content
TelamonJS

Field Types

All 36 field types registered in the telamonjs-ui field system

Reference for all 36 field types registered in the telamonjs-ui field system (list them with getAvailableFieldTypes()). Use these in FormSection.fields[].type.

'select' does NOT exist

There is no 'select' field type. Always use 'relationship' for dropdowns.

// ❌ NEVER use 'select' (does not exist) — and there is no `options` prop either
{ name: 'category', type: 'select', options: [...] }

// ✅ ALWAYS use 'relationship'; options come from `loadField`
{
  name: 'category',
  label: 'Category',
  type: 'relationship',
  loadField: async () => [
    { value: 'a', label: 'Category A' },
    { value: 'b', label: 'Category B' },
  ],
}

loadField has the type () => Promise<IOption[]> | ((search, id, dependsOn?) => Promise<IOption[]>): return the options directly (IOption is { value: string | number; label }), or return a search function for server-side filtering of large lists. Pair it with dependsOn to reload options when another field changes.


Quick Reference

Field TypeWhen to UseSpecial Props
'text'Simple textplaceholder
'email'Validated emailplaceholder
'password'Passwordplaceholder
'textarea'Long textplaceholder, rows (default 4)
'number'Integerplaceholder
'float'Decimal numberplaceholder
'boolean'On/off switchdefault
'checkbox'Checkboxdefault
'date'DateminDate, maxDate
'datetime'Date + time-
'masked-datetime'Masked date/timemask
'relationship'Dropdown / selectloadField, dependsOn
'multiselect'Multiple selectloadField, dependsOn
'image'Image uploaduploadFn, path
'file'File uploaduploadFn, path, resolveUrl
'masked'Masked input (CPF, phone)mask, maskType — see Masks
'component'Custom componentComponent
'crud'Nested data 1:NSee CRUD Field Pattern
'hidden'Hidden field-

Every field also accepts name, label, type, required, description, placeholder, span, readOnly, default, editOnly and visibleWhen.

Additional Types (full registry)

Field TypeCategoryWhen to Use
'string'TextAlias of 'text' (same renderer)
'currency'NumberFormatted monetary values
'masked-date'Date/TimeMasked date (same renderer as 'date')
'time'Date/TimeTime only (HH:mm)
'daterange'Date/TimeDate interval (start/end)
'month'Date/TimeMonth picker (HTML5 month input)
'week'Date/TimeWeek picker (HTML5 week input)
'fileupload'FileUpload with advanced UI (progress/drag-drop)
'url'HTML5Validated URL (url input)
'tel'HTML5Phone (tel input)
'color'HTML5Color picker (color input)
'range'HTML5Numeric slider (range input)
'search'HTML5Search field (search input)
'richtext'AdvancedRich text editor (TipTap — lazy-loaded)
'wizard'AdvancedMulti-step flow inside the form
'svg'SpecialSVG upload/preview
'space'SpecialLayout spacer (renders no input)

Masks

A 'masked' field formats digits as they are typed. Give it a maskType preset, or your own mask where each _ is one digit:

maskTypeMask
'tel'(__) ____-____, switching to (__) _____-____ at the 11th digit
'cpf'___.___.___-__
'cnpj'__.___.___/____-__ (digits only)
'cep'_____-___
{ name: 'document', label: 'CPF', type: 'masked', maskType: 'cpf' }
{ name: 'code', label: 'Code', type: 'masked', mask: '___-____' } // custom mask

A preset wins over mask; any other maskType value falls back to mask. The stored value is the formatted text.


Categories

CategoryField Types
Texttext, string, email, password, textarea, masked
Numbernumber, float, currency
Booleanboolean, checkbox
Date/Timedate, datetime, masked-date, masked-datetime, time, daterange, month, week
Selectrelationship, multiselect
Fileimage, file, fileupload
HTML5url, tel, color, range, search
Advancedrichtext, wizard
Specialcomponent, crud, svg, space, hidden

Field Width in BaseForm

BaseForm uses CSS Grid (not flexbox), so className='w-full' is ignored. Use span instead, matching the section grid value:

// span must match the section grid value (default '2')
{ name: 'fullWidthField', type: 'relationship', span: '2' }
// For grid='3' sections, use span='3' for full width

On this page