Default Values for color selector

Is there any way to add a default value (not placeholder) for any input (color selector) for example from the slice machine that will be auto-loaded when the slice is created on Prismic page creator?
For now, there are mock data that can be loaded from my side as a developer to preview the slice on my local machine

Hi Mouaz,

There is no way to add a default value to the color field. You can set a fallback value in your code, like:

{ || "#000"}

Or, alternatively: if you have a defined color scheme, you could use a select field, which does allow for a default value.


1 Like