What Is Slice Machine?

Slice Machine is a desktop application that makes website development faster, easier, and smoother.

Slice Machine is a workflow tool that helps you model content and structure your web project. Slice Machine is installed via Yarn or npm, run in Node.js, and accessed via the browser.

In Prismic, Slices are the building blocks of your website. A Slice is a reusable layout for a horizontal section of a page — like a heading, an image slider, or a product detail. Slice Machine will:

  • Generate a component in your codebase for each of your Slices
  • Provide code snippets for templating all data types from Prismic
  • Create data models for your Slices and Custom Types and sync the models to Prismic
  • Preview your Slices individually with mock data while you're developing them

Slice Machine provides everything you need to start building a website with Prismic.

After downloading Slice Machine and creating a repository:

  1. Create Slices in Slice Machine
  2. Add Slices to Custom Types
  3. Build and style the components for your Slices
  4. Build and style a page for each Custom Type, using a Slice Zone component from Prismic to dynamically render your Slices
  5. Sync your Slices and your Custom Types to Prismic
  6. Keep a history of your changes by versioning your Slices and Custom Types with git

Now, you will be able to create documents in Prismic using your models.

For more detail on the process, see the documentation for your framework:

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.