Sharing Slices created not with Slice Machine

Hey! Recently we had our current repository enabled to use SliceMachine. After doing this, we realised that Slices created under "Create a new slice" in Custom Page type is not shareable with other Custom Page types. Only slices created with the SliceMachine appear in the Shared Slices tab. So our questions regarding SliceMachine are few fold:

  1. Once we start using SliceMachine for a repo, is that the only way of Sharing Slices? ie. Slices created in the Dashboard and not via Slicemachine are not shareable
  2. Is there a way of pulling slices created form the Prismic Dashboard into Slice machine?
  3. We also noticed that the Next.js documentation in Prismic Docs is heavily centered around SliceMachine. Will there be a point where we have to use SliceMachine in the future?

Hello Amir,

Thanks for reaching out to us.

Regarding your questions, please find the answers respectively:

1.Currently, Slices created in the Prismic Ui are not shareable among custom types. There is only one way to have shared slices among custom types, this is when they are pushed by The Slice builder. These pushed slices will be available in "shared slices" tab in the Prismic UI.
2.No, you can’t pull slices from Prismic-dashboard into slice machine. You can only push slices from slice builder to your repository.
(Could you please tell me what is your use case to pull slices from the Prismic-dashboard.)
3.Yes, It’s true, we recommend to use slice-machine with Next-js. It is our intention to make Slice machine part of the standard Prismic process.

I hope it answers your questions. Let me know if you have any other doubt.


Hey Priyanka thanks for your response! So regarding

  1. This is odd given the guide here and also that we have another repository a while back that was able to reuse slices between custom types. I could have understood this incorrectly :confused:
  2. The reason for wanting to do this is because we want also want to allow non-tech personnel in our team to add/edit slices in the dashboard and having to setup a dev environment, running the storybook AND slices-ui is too much for something that can be done in the dashboard (for a non-tech person). Imagine this, product manager sees the need for a slice, goes to the prismic and creates the slice, developer pulls the slice (which will get the schema and create any boilerplate like --create-slice does) and fills the boilerplate with code that helps render the slice

Thanks! Point 3 was just something I noticed and was curious about, but maybe it might be important for us in deciding to use Slice Machine or simply do our own mapping from slices to components. We are more concerned about point 1 as reusing slices in different custom types as shown in the guide above is something that we want to do but currently can't in our (Slice Machine enabled) repository. Thanks for taking the time again and look forward to your response!

Hello again,

  1. This guide explains sharing slices among custom types in the Prismic repository but not in the Slice-machine enabled repository. For the moment, you can only create shared slices from Slice-Machine and currently, it is in beta version so this feature shall be available in near future. I understand this can be a bit tricky for you but I'm going to communicate this to our @features-team as a feature request.

  2. Your use-case is quite clear to me but now, you can only push slices from slice-builder to Prismic UI. Slice machine is currently designed for and to help technical people.

Let me know if you have any other question.


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