
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeWhen you create a new document schema in Sanity, you'll see the fields for the first time by running your Studio locally and opening the editing interface. Here's the typical workflow:
First, create your schema using defineType in your schema files. For example:
import { defineType, defineField } from 'sanity'
export const product = defineType({
name: 'product',
type: 'document',
title: 'Product',
fields: [
defineField({
name: 'productName',
type: 'string',
title: 'Product name',
}),
// Additional fields...
],
})Add your schema type to the sanity.config.js file:
import { defineConfig } from 'sanity'
import { deskTool } from 'sanity/desk'
import { product } from './schemas/product'
export default defineConfig({
// ... other config
schema: {
types: [product]
}
})Run the sanity dev command to start your local Studio:
npm run dev
# or
sanity devYour Studio will be available at http://localhost:3333 by default.
Once the Studio loads, you'll see your new document type in the interface. Click on it to create a new document, and you'll see all your defined fields rendered in the Form View - the default editing interface that automatically generates form inputs based on your schema definition.
The Form View translates your schema into user-friendly input components, so each field type (string, number, image, etc.) appears with the appropriate input control. Any validation rules, descriptions, or customizations you've added to your schema will also be reflected in the interface.
Thanks to Vite-powered live reloading, any changes you make to your schema will automatically update in the browser without needing to restart the server!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store