Skip to content
Strife Docs

Reference Field Reference

fields.slug()

URL slug input, with locale-suffix and uniqueness validation.

URL slug input. Maps to editor { name: 'str-input', type: 'slug' }. Slug semantics differ slightly from text: slugs feed into URL building and have their own validation rules (lowercase, dashes, locale-suffix), handled server-side at compile/push time.

Example

TypeScript
fields.slug({
  label: 'Slug',
  placeholder: 'my-page',
})

Options

OptionTypeRequiredDescription
label
string
Yes
Label shown to editors in Strife Studio.
description
string
No
Tooltip shown to editors.
localizable
boolean
No
When true, output is Record<string, string> instead of string. See caveat below.
searchable
boolean
No
Include in the team's search index.
filterable
boolean
No
Allow filtering content lists by this value.
protected
boolean
No
Restrict editing to users with the appropriate permission.
propertyName
string
No
Override the stored property name.
placeholder
string | null
No
Hint text shown in the empty input.
autoCheck
{ csrf: string; src: string } | null
No
Optional endpoint config for live slug-uniqueness checking in the editor.
Note:

In single-locale teams, localizable: true slugs are stored as plain strings server-side regardless of the DSL setting — the server normalizes at the read boundary. The DSL surface is identical either way; this only matters if you're inspecting raw stored documents.

Output type

string, or Record<string, string> when localizable: true.

See also

  • Slug~ — the same editor, documented from the Strife Studio UI side.