3

I've seen people sport beautiful tokenized tag-fields in their Sanity studios. I don't think they are using a plug-in, so what's the incantation that will turn my homely array of strings into a tokenized tag field?

thomax
  • 9,213
  • 3
  • 49
  • 68

1 Answers1

7

You can use the layout option, like this:

{
  title: "Tags",
  name: "tags",
  type: "array",
  of: [{type: "string"}],
  options: {
    layout: "tags"
  }
}

There was an error in the docs. This is now documented here: https://www.sanity.io/docs/schema-types/array-type#options Thank you for bringing this to our attention!

svale
  • 264
  • 1
  • 3