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
Not shown in Studio's editor panel.
localizable
boolean
No
When true, output is Record<string, string> instead of string. See caveat below.
searchable
boolean
No
Stored on the template; nothing uses it today.
filterable
boolean
No
Stored on the template; nothing uses it today.
protected
boolean
No
Stops the field from being edited or removed in Studio's template designer. No effect in the editor panel.
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.