Skip to content

schemaType Examples

The schemaType property links the list item to a specific document type defined in your Sanity schema.

Standard Usage

ts
{
  schemaType: 'author',
}

With Custom Title

By default, the plugin generates a title based on the schemaType. You can override it using the title property.

ts
{
  title: 'Contributors',
  schemaType: 'author',
}

With Custom Icon

ts
import { UsersIcon } from '@sanity/icons';

{
  schemaType: 'author',
  icon: UsersIcon,
}

With Combined (Title + Icon)

ts
import { UsersIcon } from '@sanity/icons';

{
  title: 'Contributors',
  schemaType: 'author',
  icon: UsersIcon,
}

With Disabled Pluralization

Use isPlural: false to display the singular name as defined in your schema.

ts
{
  schemaType: 'author',
  isPlural: false,
}

Released under the MIT License.