Adds a reusable link field to Payload collections, with a Lexical editor feature that shares the same value shape. A plugin resolves internal document URLs through a configurable callback. It includes admin styles, HTML converters and React JSX converters for frontend rendering. Targets Payload 4.
PayloadCMS link-field plugin.
Installation
npm i @sittari/payload-link-field0
Stars
0
Forks
0
Open Issues
2 months ago
Last Updated
46
Weekly Downloads
v0.4.1
npm Version
197.3 KB
Unpacked Size
1
Dependencies
00 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
| Oct 10, 2026 | 0 |
| Oct 9, 2026 | 0 |
| Oct 8, 2026 | 0 |
| Oct 7, 2026 | 0 |
| Oct 6, 2026 | 0 |
| Oct 5, 2026 | 0 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 0 |
| Oct 2, 2026 | 0 |
| Oct 1, 2026 | 0 |
| Sep 30, 2026 | 0 |
| Sep 29, 2026 | 0 |
| Sep 28, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Sep 26, 2026 | 0 |
| Sep 25, 2026 | 0 |
| Sep 24, 2026 | 0 |
| Sep 23, 2026 | 0 |
| Sep 22, 2026 | 0 |
| Sep 21, 2026 | 0 |
| Sep 20, 2026 | 0 |
| Sep 19, 2026 | 0 |
| Sep 18, 2026 | 0 |
| Sep 17, 2026 | 0 |
| Sep 16, 2026 | 0 |
| Sep 15, 2026 | 0 |
| Sep 14, 2026 | 0 |
| Sep 13, 2026 | 0 |
| Sep 12, 2026 | 0 |
| Sep 11, 2026 | 0 |
| Sep 10, 2026 | 0 |
| Sep 9, 2026 | 0 |
| Sep 8, 2026 | 0 |
| Sep 7, 2026 | 0 |
Shared by 8 plugins in sittari-studio/payload-plugins.
47−19 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 47 |
| Dec 5, 2026 | 20 |
| Dec 4, 2026 | 20 |
| Dec 3, 2026 | 20 |
| Dec 2, 2026 | 17 |
| Dec 1, 2026 | 19 |
| Nov 30, 2026 | 19 |
| Nov 29, 2026 | 18 |
| Nov 28, 2026 | 17 |
| Nov 27, 2026 | 17 |
| Nov 26, 2026 | 17 |
| Nov 25, 2026 | 4 |
| Nov 24, 2026 | 3 |
| Nov 23, 2026 | 3 |
| Nov 22, 2026 | 17 |
| Nov 21, 2026 | 18 |
| Nov 20, 2026 | 31 |
| Nov 19, 2026 | 31 |
| Nov 18, 2026 | 45 |
| Nov 17, 2026 | 45 |
| Nov 16, 2026 | 46 |
| Nov 15, 2026 | 33 |
| Nov 14, 2026 | 33 |
| Nov 13, 2026 | 20 |
| Nov 12, 2026 | 20 |
| Nov 11, 2026 | 7 |
| Nov 10, 2026 | 20 |
| Nov 9, 2026 | 30 |
| Nov 8, 2026 | 29 |
| Nov 7, 2026 | 31 |
| Nov 6, 2026 | 30 |
| Nov 5, 2026 | 33 |
| Nov 4, 2026 | 38 |
| Nov 3, 2026 | 25 |
| Nov 2, 2026 | 14 |
| Nov 1, 2026 | 14 |
| Oct 31, 2026 | 12 |
| Oct 30, 2026 | 13 |
| Oct 29, 2026 | 10 |
| Oct 28, 2026 | 3 |
| Oct 27, 2026 | 3 |
| Oct 26, 2026 | 4 |
| Oct 25, 2026 | 5 |
| Oct 24, 2026 | 10 |
| Oct 23, 2026 | 9 |
| Oct 22, 2026 | 11 |
| Oct 21, 2026 | 12 |
| Oct 20, 2026 | 20 |
| Oct 19, 2026 | 20 |
| Oct 18, 2026 | 19 |
| Oct 17, 2026 | 16 |
| Oct 16, 2026 | 17 |
| Oct 15, 2026 | 24 |
| Oct 14, 2026 | 23 |
| Oct 13, 2026 | 16 |
| Oct 12, 2026 | 15 |
| Oct 11, 2026 | 17 |
| Oct 10, 2026 | 24 |
| Oct 9, 2026 | 44 |
| Oct 8, 2026 | 38 |
| Oct 7, 2026 | 40 |
| Oct 6, 2026 | 51 |
| Oct 5, 2026 | 51 |
| Oct 4, 2026 | 53 |
| Oct 3, 2026 | 53 |
| Oct 2, 2026 | 36 |
| Oct 1, 2026 | 35 |
| Sep 30, 2026 | 52 |
| Sep 29, 2026 | 40 |
| Sep 28, 2026 | 53 |
| Sep 27, 2026 | 52 |
| Sep 26, 2026 | 52 |
| Sep 25, 2026 | 53 |
| Sep 24, 2026 | 56 |
| Sep 23, 2026 | 50 |
| Sep 22, 2026 | 58 |
| Sep 21, 2026 | 95 |
| Sep 20, 2026 | 363 |
| Sep 19, 2026 | 356 |
| Sep 18, 2026 | 353 |
| Sep 17, 2026 | 354 |
| Sep 16, 2026 | 348 |
| Sep 15, 2026 | 341 |
| Sep 14, 2026 | 291 |
| Sep 13, 2026 | 20 |
| Sep 12, 2026 | 17 |
| Sep 11, 2026 | 41 |
| Sep 10, 2026 | 37 |
| Sep 9, 2026 | 37 |
| Sep 8, 2026 | 50 |
| Sep 7, 2026 | 66 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1294311885-link-field)<a href="https://payloaddirectory.dev/plugins/1294311885-link-field"><img src="https://payloaddirectory.dev/badge/1294311885-link-field.svg" alt="Payload Directory"></a>README
PayloadCMS link-field plugin.
pnpm add @sittari/payload-link-field
Import the admin stylesheet from your Payload admin CSS file:
@import '@sittari/payload-link-field/admin.css';
import { buildConfig } from 'payload';
import { linkField, linkFieldPlugin } from '@sittari/payload-link-field';
export default buildConfig({
plugins: [
linkFieldPlugin({
resolveDocumentUrl: ({ collectionSlug, document }) => {
if (collectionSlug === 'pages' && typeof document?.slug === 'string') {
return `/${document.slug}`;
}
return null;
},
}),
],
collections: [
{
slug: 'pages',
fields: [
{
name: 'title',
type: 'text',
},
linkField({
name: 'link',
label: 'Link',
appearance: 'drawer',
relationTo: ['pages', 'posts'],
localizeLabel: true,
}),
],
},
],
});
localizeLabel controls whether the link's nested label field is localized.
It defaults to true; set it to false when link labels should use one value
across all locales.
LinkFieldFeature() uses the same field schema and value shape as linkField(). It must
replace Payload's native feature (both features use the link key), and
linkFieldPlugin() remains required because it registers resolveDocumentUrl for reads
and serialization.
import { lexicalEditor } from '@payloadcms/richtext-lexical';
import { LinkFieldFeature } from '@sittari/payload-link-field';
const editor = lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures.filter((feature) => feature.key !== 'link'),
LinkFieldFeature({
relationTo: ['pages', 'posts'],
}),
],
});
The feature accepts defaultType, relationTo, showLabel, and showNewTab.
When relationTo is omitted, all non-internal collections are considered and
collections the current admin user cannot read are removed from the relationship
selector. Collections whose slugs start with payload- are always discarded,
including when explicitly provided.
Existing Payload-native custom and internal link nodes are normalized lazily when read or
opened in the editor; their next save writes only the plugin-owned field shape.
Payload v4 HTML conversion requires custom node converters to be passed explicitly:
import {
convertLexicalToHTMLAsync,
defaultHTMLConvertersAsync,
} from '@payloadcms/richtext-lexical/html-async';
import { LinkFieldHTMLConverters } from '@sittari/payload-link-field';
const html = await convertLexicalToHTMLAsync({
converters: {
...defaultHTMLConvertersAsync,
...LinkFieldHTMLConverters,
},
data,
});
The React export provides JSX converters for Payload's RichText component and is safe to
import from React Server Components. Spread the plugin converters after Payload's defaults:
import { RichText } from '@payloadcms/richtext-lexical/react';
import { LinkFieldJSXConverter } from '@sittari/payload-link-field/react';
export const Content = ({ data }) => (
<RichText
converters={({ defaultConverters }) => ({
...defaultConverters,
...LinkFieldJSXConverter(),
})}
data={data}
/>
);
The spread order intentionally replaces Payload's default link and autolink converters.
The converter renders only a populated fields.url; unresolved links preserve their
formatted children without rendering an anchor or falling back to customUrl.
Pass a renderer to integrate Next.js Link, analytics, or custom routing. The renderer
receives normalized fields, rendered children, url, newTab, and the untouched
serialized node:
import Link from 'next/link';
import { LinkFieldJSXConverter } from '@sittari/payload-link-field/react';
const converters = LinkFieldJSXConverter({
renderer: ({ children, newTab, url }) => (
<Link
href={url}
rel={newTab ? 'noopener noreferrer' : undefined}
target={newTab ? '_blank' : undefined}
>
{children}
</Link>
),
});
payload plugin json form builder
Edit a Payload json field as real admin fields, with the form shape built in the admin panel
72441/wk37v3
heading field
Field wrapper that lets editors choose the h1–h6 tag for text, textarea, or rich text headings
62156/wk16v3
payload plugin reading time
Computed reading time and word count fields for Payload Lexical rich-text content
42117/wk1v3
payload mailing
Template-based email with layouts, scheduling and job-queue delivery through Payload collections
68290/wk1v3
richtext
Rich-text child block, default Lexical editor preset and JSX renderer for Atomic Payload
6433/wk37v3
select search field
Server-backed search select field that fetches options from a custom search function through a shared endpoint
6139/wk16v3