Fields

Fields allow you to create data fields which can be updated by a content editor to instantly populate your website with content

Primo is built and powered by Svelte, a powerful compiler for building user interfaces.

Integrating fields

Once you've created a field, you can integrate it into your component by calling it by its id. In this case, the links field is used within a Svelte each block to generate a link list.

Repeater Field

Group Field

Image Field

The image field value is an object containing a url property (aliased as src) and an alt property (containing the value entered for "Description" in the CMS).

Content Field

The content field accepts Markdown and outputs HTML, which means it requires using Svelte's {@html} block

The Link Field value is an object containing a url andlabel properties

Last updated

Was this helpful?