Position input

Studio v2
This plugin only works with an older version of Sanity Studio (v2), which is deprecated.

Position input that stores the selected position.

v2 install command (deprecated)

sanity install position-input

sanity-position-input

Position input for Sanity that stores selected position.

Usage

Use it in your schema types:

// [...]
{
  fields: [
    // [...]
    {
      name: 'position',
      title: 'Poistion',
      type: 'position',
      options: {
        choices: ['left', 'center', 'right', 'full', 'drop-left', 'drop-right']
      }
    }
  ]
}

Note that the above only works if you import and use the all:part:@sanity/base/schema-type part in your schema.

License

MIT-licensed. See LICENSE.