sittari-studio

slug field

by sittari-studio
payload-plugins
Redirects & URLs
v4
^4.0.0-0
MIT

Overview

Summary generated from the README

Provides a createSlugField function that returns a ready-made slug field row for Payload collections. By default the field is required, localized, derives from the title field and appears in the sidebar. Options let you set the source field, localization, instruction text per locale, and an overrides callback to modify or replace the result. Targets Payload 4.

Features

  • Factory function that returns a slug field for any collection
  • Defaults to required, localized, sourced from the title field and shown in the sidebar
  • Choose a different source field through the useAsSlug option
  • Optional per-locale instruction text shown in the admin
  • Overrides callback to modify or replace the finished field

Use cases

  • Add a consistent URL slug field to posts and pages collections
  • Generate slugs from a name field instead of title in non-localized collections
  • Show editors translated guidance on how the slug forms the page URL

From the author

Configurable slug field factory for Payload CMS.

Installation

npm i @sittari/payload-slug-field

0

Stars

0

Forks

0

Open Issues

2 months ago

Last Updated

20

Weekly Downloads

v0.4.1

npm Version

18.7 KB

Unpacked Size

2

Dependencies

Repository stars

00 since Sep 6

Show data
Repository stars by day (UTC)
DateStars
Dec 5, 20260
Dec 4, 20260
Dec 3, 20260
Dec 2, 20260
Dec 1, 20260
Nov 30, 20260
Nov 29, 20260
Nov 28, 20260
Nov 27, 20260
Nov 26, 20260
Nov 25, 20260
Nov 24, 20260
Nov 23, 20260
Nov 22, 20260
Nov 21, 20260
Nov 20, 20260
Nov 19, 20260
Nov 18, 20260
Nov 17, 20260
Nov 16, 20260
Nov 15, 20260
Nov 14, 20260
Nov 13, 20260
Nov 12, 20260
Nov 11, 20260
Nov 10, 20260
Nov 9, 20260
Nov 8, 20260
Nov 7, 20260
Nov 6, 20260
Nov 5, 20260
Nov 4, 20260
Nov 3, 20260
Nov 2, 20260
Nov 1, 20260
Oct 31, 20260
Oct 30, 20260
Oct 29, 20260
Oct 28, 20260
Oct 27, 20260
Oct 26, 20260
Oct 25, 20260
Oct 24, 20260
Oct 23, 20260
Oct 22, 20260
Oct 21, 20260
Oct 20, 20260
Oct 19, 20260
Oct 18, 20260
Oct 17, 20260
Oct 16, 20260
Oct 15, 20260
Oct 14, 20260
Oct 13, 20260
Oct 12, 20260
Oct 11, 20260
Oct 10, 20260
Oct 9, 20260
Oct 8, 20260
Oct 7, 20260
Oct 6, 20260
Oct 5, 20260
Oct 4, 20260
Oct 3, 20260
Oct 2, 20260
Oct 1, 20260
Sep 30, 20260
Sep 29, 20260
Sep 28, 20260
Sep 27, 20260
Sep 26, 20260
Sep 25, 20260
Sep 24, 20260
Sep 23, 20260
Sep 22, 20260
Sep 21, 20260
Sep 20, 20260
Sep 19, 20260
Sep 18, 20260
Sep 17, 20260
Sep 16, 20260
Sep 15, 20260
Sep 14, 20260
Sep 13, 20260
Sep 12, 20260
Sep 11, 20260
Sep 10, 20260
Sep 9, 20260
Sep 8, 20260
Sep 7, 20260
Sep 6, 20260

Shared by 8 plugins in sittari-studio/payload-plugins.

npm weekly downloads

10−5 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 202610
Dec 4, 202612
Dec 3, 202611
Dec 2, 20264
Dec 1, 202611
Nov 30, 202612
Nov 29, 202611
Nov 28, 202610
Nov 27, 20268
Nov 26, 20268
Nov 25, 20269
Nov 24, 20262
Nov 23, 20261
Nov 22, 20264
Nov 21, 20264
Nov 20, 20269
Nov 19, 202610
Nov 18, 202613
Nov 17, 202613
Nov 16, 202613
Nov 15, 202611
Nov 14, 202612
Nov 13, 20267
Nov 12, 20267
Nov 11, 20264
Nov 10, 20269
Nov 9, 202615
Nov 8, 202614
Nov 7, 202613
Nov 6, 202613
Nov 5, 202615
Nov 4, 202618
Nov 3, 202613
Nov 2, 20267
Nov 1, 20267
Oct 31, 20267
Oct 30, 20267
Oct 29, 20264
Oct 28, 20260
Oct 27, 20260
Oct 26, 20262
Oct 25, 20263
Oct 24, 20264
Oct 23, 20264
Oct 22, 20266
Oct 21, 202612
Oct 20, 202613
Oct 19, 202612
Oct 18, 202612
Oct 17, 202611
Oct 16, 202612
Oct 15, 202613
Oct 14, 202613
Oct 13, 202612
Oct 12, 202611
Oct 11, 202611
Oct 10, 202613
Oct 9, 202614
Oct 8, 202613
Oct 7, 20267
Oct 6, 202611
Oct 5, 202611
Oct 4, 202612
Oct 3, 202611
Oct 2, 20269
Oct 1, 20267
Sep 30, 202611
Sep 29, 20268
Sep 28, 202610
Sep 27, 202611
Sep 26, 202620
Sep 25, 202625
Sep 24, 202627
Sep 23, 202634
Sep 22, 202640
Sep 21, 202671
Sep 20, 2026327
Sep 19, 2026317
Sep 18, 2026313
Sep 17, 2026314
Sep 16, 2026304
Sep 15, 2026298
Sep 14, 2026265
Sep 13, 202612
Sep 12, 202612
Sep 11, 202615
Sep 10, 202616
Sep 9, 202616
Sep 8, 202618
Sep 7, 202618
Sep 6, 202615

Each point is npm's rolling 7-day download count.

Health Score

64/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1294311885-slug-field.svg)](https://payloaddirectory.dev/plugins/1294311885-slug-field)
HTML
<a href="https://payloaddirectory.dev/plugins/1294311885-slug-field"><img src="https://payloaddirectory.dev/badge/1294311885-slug-field.svg" alt="Payload Directory"></a>
Updated Sep 11, 2026Created Jul 8, 2026Published Sep 11, 2026

README

@sittari/payload-slug-field

A reusable, configurable Payload slug-field factory.

Install

pnpm add @sittari/payload-slug-field

Usage

import { createSlugField } from '@sittari/payload-slug-field';

export const Posts = {
  slug: 'posts',
  fields: [
    { name: 'title', type: 'text', required: true },
    createSlugField({
      instruction: {
        en: 'The slug becomes part of the page URL.',
        uk: 'Слаг стає частиною URL сторінки.',
      },
    }),
  ],
};

createSlugField() returns Payload's slug row. It is required, localized, uses title as its source, and appears in the sidebar by default. It adds no instruction text unless instruction is provided.

Use overrides to modify or replace the completed row:

createSlugField({
  useAsSlug: 'name',
  localized: false,
  overrides: (defaultSlugField) => ({
    ...defaultSlugField,
    admin: { ...defaultSlugField.admin, position: 'sidebar' },
  }),
});

Similar plugins