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?

1 Answer 1

8

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.