Go Behind the Experience to see how Tecovas brings the West to life with Sanity 🤠 July 18th

Implementing Conditional-Based Options with a Custom Input Component

3 replies
Last updated: Jun 17, 2020
Hey guys, does sanity support “out of the box” conditional based options. What I mean by that is, if you check an item, it reveals other options?
Jun 17, 2020, 11:56 AM
It unfortunately does not. However, it is definitely possible to do that with a custom input component. Some relevant links:

There is also this collection of components that's kinda undocumented:

They're very useful for making you custom input match the rest of the studio. The
file there can help you figure out what paths to use in your
statements to get those components.
Jun 17, 2020, 2:07 PM
Jun 17, 2020, 2:56 PM
i've used it a couple of times to good effect
Jun 17, 2020, 2:56 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?