Sanity Structure Tool
A JSON based powerful structure tool for Sanity Studio
By Nisharg Shah
Install command
npm i sanity-plugin-structure-toolSanity Structure Tool
A JSON-based powerful structure tool for Sanity Studio.
Sanity Structure Tool is a declarative plugin designed to eliminate the repetitive boilerplate required by the native Sanity Structure Builder. It allows you to define your studio's desk hierarchy using a clean and flexible JSON configuration system.
Key Features
- Declarative Syntax: Define complex structures using a hierarchical data structure instead of imperative method chaining.
- Built-in Singleton Support: Simply add
singleton: trueto handle document IDs, editor views, and filtering automatically. - Automatic Pluralization: Automatically generates plural titles for document lists, with easy overrides.
- Workspace & Role Awareness: Easily restrict visibility of list items based on workspaces or user roles with built-in protection.
- Full TypeScript Support: Provides comprehensive type safety and autocompletion for your structure definitions.
- Escape Hatch: Drop back into the native Sanity Structure Builder API whenever you need highly custom functionality.
Links
License
This project is licensed under the MIT License.