examples/README.md
This directory contains comprehensive examples and reference implementations for various Sanity features and integrations. Whether you're building your first Sanity project or exploring advanced functionality, these examples provide practical code you can reference and adapt.
examples/
āāā functions/ # Sanity Functions examples
āāā studios/ # Studio configuration examples
The functions/ directory contains examples of Sanity Functions - serverless functions that run in Sanity's cloud environment. Each function example includes:
index.ts) - The actual function logicpackage.json) - Dependencies and blueprint resource configurationdocument.json) - Sample data for testingREADME.md) - Usage instructions and explanationssanity.blueprint.ts - Automatically discovers and configures all function examples for easy testingpackage.json - Shared dependencies for all function examplesvite.config.js - Build configuration for bundling functionsThe studios/ directory contains complete Sanity Studio configurations showcasing different use cases:
Each studio example demonstrates schema design, custom components, and workflow configurations.
For comprehensive documentation and tutorials, visit:
Found a bug or have an idea for a new example? Contributions are welcome! Please check the project's contribution guidelines before submitting pull requests.
Note: These examples are part of the Sanity monorepo and are designed for reference and learning. For production use, always review and adapt the code to meet your specific requirements and security standards.