Library

Field Types

TypeScript definitions for PayloadCMS field types

Preview

import type { TextField, UploadField, ArrayField } from "~/payload/fields";

// Use specific field types in your configurations
const nameField: TextField = {
  name: "name",
  type: "text",
  required: true,
};

const logoField: UploadField = {
  name: "logo",
  type: "upload",
  relationTo: "media",
};

Props

The Field Types library exports the following TypeScript type definitions:

Prop

Type

Installation

npx shadcn@latest add @uifoundry/field-types

If you encounter issues, check the registry setup guide for configuration help.

Registry Dependencies

This component has no registry dependencies - it's a foundational type definition library.

Dependencies

This component requires the following NPM packages:

  • PayloadCMS - Headless CMS and application framework