The standard field library and registry for Object UI.
- 📚 Standard Fields - Implementation of all ObjectStack protocol fields (Text, Number, Date, Lookup, etc.)
- 🔌 Plugin System -
FieldRegistryallows registering custom renderers or overriding standard ones. - 🛠 Helpers - Utilities for schema mapping, validation, and expression evaluation.
npm install @object-ui/fieldsThe Field Registry is the core mechanism that allows decoupling view components from specific field implementations.
You can override standard fields or add new ones:
import { registerFieldRenderer } from '@object-ui/fields';
import { MyCustomColorPicker } from './MyCustomColorPicker';
// Register a new 'color' field type
registerFieldRenderer('color', MyCustomColorPicker);View components use getCellRenderer to resolve the correct component for a field type.
import { getCellRenderer } from '@object-ui/fields';
const MyGridCell = ({ field, value }) => {
const Renderer = getCellRenderer(field.type);
return <Renderer field={field} value={value} />;
};Supported types out of the box:
- Basic:
text,textarea,number,boolean - Format:
currency,percent - Date:
date,datetime,time - Selection:
select,lookup,master_detail - Contact:
email,phone,url - Media:
file,image - System:
formula,summary,auto_number
select options support a per-option visibleWhen CEL predicate (offered only
when TRUE, evaluated against the live record + current_user) and a field-level
dependsOn. Together they drive dependent selects (country → province → city)
and role-gated options with no bespoke matrix — the same primitives dependent
lookups use. While a dependsOn parent is empty the control is gated; a parent
change re-filters the list and clears a now-invalid value. Client-side hiding is
UX only — gate authorization-sensitive values on the server too. See
content/docs/fields/select.mdx.
- React: 18.x or 19.x
- Node.js: ≥ 18
- TypeScript: ≥ 5.0 (strict mode)
@objectstack/spec: ^3.3.0@objectstack/client: ^3.3.0- Tailwind CSS: ≥ 3.4 (for packages with UI)
MIT — see LICENSE.