Developing slice variations

Say I want to add a variation for a slice, lika a background on/off (boolean value).

At first, if I look in this sms-hoy slice it looks like a storybook boolean is used to control the inversion of this slice. The boolean then alters the slice label, right, so I guess i shoould find a slice label somewhere in Prismic? But I cant find where to add labels to the slices i created using slice machine.

Then i saw there's something new called "variations". Is this something that should be used instead?

So all in all, whats the preferred way of adding slice variations in both Prismics editor and Storybook?

Hello Samuel,

Thank you for contacting us. We have discussed about this here:-

For background on/off : You can add a boolean field on Prismic then you need to develop code for handling this boolean variable and apply css classes accordingly.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.