DEV Community

MANOJ AP
MANOJ AP

Posted on • Updated on

Prismic Slices

Prismic

Prismic is a headless CMS for developing sophisticated web and E-commerce apps. It is a custom type based API with cloud hosting feature, plus a easy to use content editor.

What is a slice in Prismic ?

Slices

Slices can think of code block in a block editor , for example paragraph in WordPress block editor. In Prismic while creating custom types we can switch on the slices, can add the optional reusable slices come with the CMS or we can create our own. These are optional fields in prismic types

Slices are optional fields in Prismic, they can be placed from slices gallery.

Types

Slices have two section repeatable and none repeatable section. Repeatable section can have multiple elements of same type, for instance the images.

where the slices stored ?

Slices will be stored in data.body key as n array.

How to render

We can render the slices as regular component but Vue offers a prismic slize-zone for dynamic handling of slices. Alternatively we can use Vue's dynamic component approach.

Top comments (0)