Attribute Reference
Attributes define how each field is stored, validated, and rendered.
Attribute Shape
{
name: 'status',
label: 'Status',
scope: 'global',
dataType: 'string',
inputType: 'select',
defaultValue: 'active',
options: {
list: [
{ label: 'Active', value: 'active' },
{ label: 'Inactive', value: 'inactive' }
],
comment: 'Operational lifecycle status',
placeholder: 'Select a status',
size: 160,
},
isSearchable: true,
validation: (z) => z.string().min(1, { message: 'Status is required' }),
}Required Keys
name: stringlabel: stringscope: 'local' | 'global' | 'relationship'dataType: DataTypeinputType: InputType
Optional Keys
defaultValue?: stringpreviewType?: PreviewTypeisEditable?: booleanisHidden?: booleanisPrimary?: booleanisUnique?: booleanisSearchable?: booleanoptions?: AttributeOptions[inputType]relationship?: { entity: string; mode: 'single' | 'multiple'; field: string }validation?: (z) => zodSchema
Scope
global: shared across all scopes.local: scope-specific value.relationship: relationship field/connection semantics.
Validation
Flexkit uses a zod callback.
validation: (z) => z.number().min(0, { message: 'Must be >= 0' })Use validation for constraints that should block invalid input.
Flags
isPrimary: preferred display field in relationship UIs.isUnique: marks uniqueness intention.isSearchable: includes field in search behavior.isEditable: false: renders as read-only.isHidden: true: hides the field.
Relationship Attributes
When inputType: 'relationship', add:
relationship: {
entity: 'company',
mode: 'single',
field: 'name',
}entity: target entity name.mode:singleormultiple.field: target attribute used for display/labeling.
Last updated on