> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.slug). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# 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

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

## Options

| Option         | Type                                    | Required | Description                                                                            |
| -------------- | --------------------------------------- | -------- | -------------------------------------------------------------------------------------- |
| `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\~](https://strife.app/docs/reference/fields/slug.md) — the same editor, documented from the Strife Studio UI side.
