Skip to content

Slug

The slug input type is used to automatically generate URL-friendly strings (slugs) from another field (like a title) or from the user’s own input. It supports transliteration from Cyrillic → Latin and formatting (lowercase, dashes instead of spaces).

vue
<template>
  <VsForm :schema v-model="value"/>
</template>
<script>
const value = ref({});
const schema = [
  {type:'text', name:'title', label:'Title'},
  {type:'slug', name:'slug', label:'Slug' , parent: 'title'}
]
</script>
Title
Slug

{}

Properties

Required Properties

  • name (string): Unique identifier for the field

  • type (string): Must be 'slug'

  • label (string): Display label

Optional Properties

  • placeholder (string): Hint text shown when empty

  • disabled (boolean): Whether the field is disabled

  • parent (string): Key of another field from which to auto-generate slug

  • rules (array): Validation rules