Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Request for help building custom input component for Vimeo video preview

3 replies
Last updated: Jun 12, 2023
Hi all, I'm currently looking to build a custom input component that previews a Vimeo video based on a text input. The text input would expect an ID or URL pointing to the Vimeo video. This example (https://www.sanity.io/schemas/vimeo-youtube-video-id-and-thumbnail-custom-component-4a86c2f5 ) is essentially what I'm looking for, although this has been written for the V2 Studio. I'm aware that there is a well documented V2-V3 migration guide, yet I thought it would be worth asking if there are existing versions of the aforementioned example written for V3. I'm still a react novice and unfamiliar with the process of writing custom input components and was hoping people could give me pointers. Any help is greatly appreciated and thank you in advance! 🙏
Jun 11, 2023, 12:26 PM
No, unfortunately there isn’t a guide for this. The good news is that the majority of the component can be rendered using the
renderDefault
method that’s passed into your props.
Jun 12, 2023, 6:39 PM
user M
thank you for getting back, I really appreciate you taking the time to respond to this. I'm not entirely sure how to use the renderDefault functionality, specifically in relation to this example. Is there a specific documentation that I can learn from?
Jun 12, 2023, 10:18 PM
Sure! There’s more information about that method here .
Jun 12, 2023, 11:18 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?