Estimated reading time
Content estimated reading time component in TypeScript.
Go to Estimated reading timeContent estimated reading time component in TypeScript.
Go to Estimated reading timeLearn how to build a custom image gallery preview component that can be added to Portable Text.
Go to Custom Image Gallery Preview Component - Portable TextA code snippet to create a custom '+ Add item' button to add items to the top of an array.
Go to Add items to top of array with custom '+ Add item' buttonSometimes you need to change only one key-value-pair in your data, this is how you can do it in 2 lines
Go to Create a copy of an object and change a key-value pairSetting up a live preview and want to fetch a document's draft, with a fallback for the published document when there are no drafts? Check this out.
Go to Select draft OR published documentThis validation can be used if you have two fields and you require one or the other to be filled
Go to One or the other validationWe can turn off validation for fields using the same logic we use to hide them
Go to Optional validation for hidden fieldsThis recipe is a UX affordance for Sanity Studio, which makes it easier for editors to manage heavily cross-referenced documents. It provides a list of backlinks to referring documents.
Go to List Referring Documents (Backlinks) in SanityHow to automatically generate linked headings with a custom serializer
Go to Anchored Headings for Portable TextQuickly and easily validate your slug without having to work out the regex syntax
Go to Easy peasy URL SlugSuggest relevant content based on category tags.
Go to Related ContentDocument specific content previews
Go to Document specific content previewsSimple Placeholder Custom Input utilising Sanity UI.
Go to Custom Input: PlaceholderThis snippet will help filter groq query by category or tags in a document. eg: post
Go to Sanity query filter by category or tags (Groq Snippet)How to make scaleable image gallery's
Go to Image gallerySet slug on publish document action
Go to Set slug on publish with referenced field valueHow to add different types of “breaks” for Portable Text that can be translated to horizontal rules, “read more”, sections, chapters, and so on.
Go to Breaks for Portable TextGet details of the currently logged in Sanity user
Go to useCurrentUser Custom React Hook